Ubuntu Server 24.04.1 LTS fresh install errors in apt install and upgrade
Keith
keithw at caramail.com
Sat Feb 1 15:40:04 UTC 2025
On 1/31/25 9:02 AM, Bo Berglund wrote:
> On Wed, 29 Jan 2025 12:47:52 -0600, Keith via ubuntu-users
> <ubuntu-users at lists.ubuntu.com> wrote:
>
>> On 1/29/25 6:20 AM, Bo Berglund wrote:
>>> Everything seemed OK until I installed:
>>>
>>> sudo apt install mosquitto mosquitto-clients
>>>
>>> At the end of that I got to this message:
>>>
>>> Could not execute systemctl: at /usr/bin/deb-systemd-invoke line 148.
>>>
> ---
>>>
>>> Why does mosquitto not install and how can I get all packages up-to-date?
>>>
>
>>
>> You might try reinstalling just the mosquitto package by itself and see
>> if the problem persists. If the mosquitto.service does fail to start
>> again, then I'd purge (sudo apt autopurge mosquitto) the package making
>> sure all config files are deleted and then attempt a reinstall.
>>
>
> After a lot of checking I found the problem:
> There was already a mosquitto running and it had grabbed the default port number
> on the NIC. And apt did not see that when I asked it to install mosquitto...
> So the new installed mosquitto could not start since the port was occupied...
Ah yeah, that would do it. Apt doesn't really know much about snap
packages and vice versa. It's possible to install apps via snap and apt
(and flatpak and appimage for that matter) and have them all co-exist on
the same system. However, running them at the same time can potentially
cause problems when they're vying exclusively for the same system
resources.
>
> But how could that have happened?
You'd either have to install it or maybe it might be a dependency of
some other snap installed.
>
> Turns out that the extra install was a "snap" and so was not seen by apt, which
> went ahead and installed it again....
> Very strange since this was a fresh install of the Ubuntu Server 24.04.1 system.
Perhaps you selected it during the installation? During the "install
software" phase, a list of featured server snaps available to select
from is presented which includes the mosquitto snap. Other than that
possibility, I don't know.
>
> So after I did a snap remove mosquitto and apt remove mosquitto I could install
> it again normally with apt.
>
> And I also found out how to activate PRO using my subscription, so now I am
> pretty much up-to-date and can move forward with the rest of
> install/configuration to get my new system a functional replacement for my older
> system.
>
>
Sounds like you're good to go.
--
Keith
More information about the ubuntu-users
mailing list