Ubuntu Server 24.04.1 LTS fresh install errors in apt install and upgrade
Keith
keithw at caramail.com
Wed Jan 29 18:47:52 UTC 2025
On 1/29/25 6:20 AM, Bo Berglund wrote:
> I hoped I would be just breezing through making my new server using a freash
> 24.04.1 LTS installation ISO followed by the usual list of apt installs, but now
> here I am again....
>
> 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.
>
> And the service check yielded this:
>
> sudo systemctl status mosquitto
> × mosquitto.service - Mosquitto MQTT Broker
> Loaded: loaded (/usr/lib/systemd/system/mosquitto.service; enabled; preset:
> enabled)
> Active: failed (Result: exit-code) since Wed 2025-01-29 12:38:29 CET; 1min
> 42s ago
It appears that mosquitto is installing, but it's failing when the
package's postinstall script calls deb-systemd-invoke script to start
the mosquito service as the last action of the package installation.
"sudo systemctl reload-or-restart mosquitto.service" might give a hint
to what's preventing the service to start. An error in a config file is
a pretty common source of failure.
>
> So I apt removed these and then ran another apt update / upgrade (did this
> yesterday too).
>
> $ sudo apt upgrade
> Reading package lists... Done
> Building dependency tree... Done
> Reading state information... Done
> Calculating upgrade... Done
> Get more security updates through Ubuntu Pro with 'esm-apps' enabled:
> libcjson1 libavdevice60 ffmpeg libpostproc57 libavcodec60 libavutil58
> libswscale7 libswresample4 libavformat60 libavfilter9
> Learn more about Ubuntu Pro at https://ubuntu.com/pro
> The following upgrades have been deferred due to phasing:
> libdrm-amdgpu1 libdrm-common libdrm-intel1 libdrm-nouveau2 libdrm-radeon1
> libdrm2 libdw1t64 libelf1t64 libgmp10
> libgpg-error-l10n libgpg-error0 libmpc3 libmpfr6 libnfsidmap1 libnl-3-200
> libnl-genl-3-200 libnl-route-3-200 libpcre2-8-0
> nfs-common nfs-kernel-server python3-distupgrade ubuntu-release-upgrader-core
> wireless-regdb
> 0 upgraded, 0 newly installed, 0 to remove and 23 not upgraded.
>
> So the syetem is *not* up-to-date (is that what stopped mosquitto from
> installing?).
> And it cannot be upgraded because it just lists that 23 packages are not
> upgraded when I try....
The packages that won't upgrade are currently phasing. They're not
likely causing the problem with the mosquitto service not starting after
installation, however.
>
> I have enrolled a few years ago into the Pro system, but they limit to 5 devices
> and I have no idea if there are any left now. Can I fiond out somehow?
> And I assume that whenever I do an install it consumes one count and I have done
> several over the years...
Go to https://ubuntu.com/pro and click "Your Subscriptions". It'll take
you to a sign-in page. Sign-in with the username and password you used
to originally set up Ubuntu Pro, and then you'll be able to access the
dashboard where you can add/delete machines on your account.
>
> Why does mosquitto not install and how can I get all packages up-to-date?
>
I did an install of the mosquitto package and it went smoothly with no
problem of starting the service at the end of the installation, so there
doesn't appear to be a bug in deb-systemd-invoke script or the mosquitto
package postinstall script.
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.
--
Keith
More information about the ubuntu-users
mailing list