Linux Lightdm Service – The unit files have no installation config

If you are trying to enable the lightdm display manager on your linux and you got this same message error, then you can solve this with a simple command line. I have searched the web for any solution, but I not found nothing that can solve this issue, so I had tried many things to solve that, and I finally found the solution.

If you are trying:

# systemctl enable lightdm

And this is the result:

Synchronizing state of lightdm.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable lightdm
The unit files have no installation config (WantedBy, RequiredBy, Also, Alias
settings in the [Install] section, and DefaultInstance for template units).
This means they are not meant to be enabled using systemctl.
Possible reasons for having this kind of units are:
1) A unit may be statically enabled by being symlinked from another unit's
   .wants/ or .requires/ directory.
2) A unit's purpose may be to act as a helper for some other unit which has
   a requirement dependency on it.
3) A unit may be started when needed via activation (socket, path, timer,
   D-Bus, udev, scripted systemctl call, ...).
4) In case of template units, the unit is meant to be enabled with some
   instance name specified.

Then remove the systemd file of lightdm service to solve that:

# rm -rf /usr/lib/systemd/system/lightdm.service

You can use sudo too:

$ sudo rm -rf /usr/lib/systemd/system/lightdm.service

Now you cant enable the lightdm service:

# systemctl enable lightdm
Compartilhar artigo

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *