4

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

ghovat
  • 143
  • 1
  • 3

2 Answers2

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.

1

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.

Anthony Geoghegan
  • 3,521
  • 19
  • 36