Ubuntu 16.04 Systemd not possible to use systemctl
Solution 1
Looks like something is seriously messed up with your OS. Perhaps you accidentally moved or deleted files or something.
Simply invoking systemctl on its own should produce output like:
UNIT LOAD ACTIVE SUB DESCRIPTION
proc-sys-fs-binfmt_misc.automount loaded active running Arbitrary Executable File Formats File System Automount Point
sys-devices-pci0000:00-0000:00:07.1-ata2-host1-target1:0:0-1:0:0:0-block-sr0.device loaded active plugged VMware_Virtual_IDE_CDROM_Drive
It seems like something is broken and suspect it will affect more than systemctl. Could you start services using service or init.d style startup?
If you can't then I imagine your unfortunately better off with a fresh re-install.
Solution 2
I had similar issues after upgrading my 14.04 Ubuntu to 16.04. Somehow, the systemd
packages did not install properly and I had the same problems as described in this question. The solution was to reinstall the relevant packages:
apt-get install --reinstall systemd-sysv ubuntu-standard
See https://wiki.ubuntu.com/SystemdForUpstartUsers for more info.
Related videos on Youtube
ghovat
Updated on September 18, 2022Comments
-
ghovat over 1 year
I have a Ubuntu 16.04 server, since the last restart, systemctl doesn't work anymore.
For example if I want to start the nginx, I get the following error:
root@SERVER:/# systemctl start nginx Failed to start nginx.service: Unknown unit: nginx.service
The same result for every other service. Just systemctl gives the following result:
root@SERVER:/# systemctl Failed to list units: No such method 'ListUnitsFiltered'
Thanks
-
user657451 over 7 yearsI don't know if it's specifically changed in your distro, but do you have a reason for not calling it with
service nginx start
or via/system.d
? -
user657451 over 7 yearsOr has the nginx.service been moved, renamed, or unlinked?
-
ghovat over 7 yearsNo the nginx.Service still exists and I got the Same result for any other Service
-
-
Skarlinski over 6 yearsFixed it, had to restart as well. Problem was that I installed upstart