60

when I tried to install RocketChat in Ubuntu 16.04

In Command Prompt I enter.

systemctl enable mongod

After That I got The issue.

systemctl: command not found

How to solve this?

7
  • Try this on terminal: dpkg-query -S /bin/systemctl .
    – Liso
    Dec 21 '17 at 8:11
  • I tried this and i got "dpkg-query: no path found matching pattern /bin/systemctl." Dec 21 '17 at 8:23
  • 2
    @VigneshRamamoorthy: What does this command give you whereis systemctl? Dec 21 '17 at 9:01
  • 1
    Are you sure you are using Ubuntu 16.04? Please update your post with output of cat /etc/os-release and ls -al $(which init).
    – N0rbert
    Dec 21 '17 at 17:08
  • 1
    Sorry my version is 12.04.5 LTS. NAME="Ubuntu" VERSION="12.04.5 LTS, Precise Pangolin" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu precise (12.04.5 LTS)" VERSION_ID="12.04" How To install RocketChat in ubuntu 12.04.5 LTS, Precise Pangolin..Have any tutorial guide? Dec 22 '17 at 5:22
82
  1. First you need to check if systemd package is installed - sudo dpkg -l | grep systemd.
  2. If not then install it by hands sudo apt-get install systemd. But if it does it might be damaged, so you may try to reinstall it sudo apt-get install --reinstall systemd.
  3. If the package is installed, even after reinstallation it does not work, list the full path of the files inside this package sudo dpkg -L systemd. Maybe binary files are located in a directory that is not included into $PATH variable.
6
  • 2
    I tried to install systemd package,i got the error "Package systemd is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source" E: Package 'systemd' has no installation candidate Dec 21 '17 at 10:04
  • 1
    What is the output of sudo apt-cache search systemd?
    – M. Dm.
    Dec 21 '17 at 10:31
  • This is output of sudo apt-cache search systemd "live-config-systemd - Debian Live - System Configuration Scripts (systemd backend) nagios-plugins-contrib - Plugins for nagios compatible monitoring systems" Dec 21 '17 at 10:52
  • 1
    Did you run sudo apt-get update after the system was installed? I think you have some problem with your repositories.
    – M. Dm.
    Dec 22 '17 at 9:41
  • 2
    Please fix your Answer: apt-get install --reinstall systemd
    – Marco
    Dec 12 '18 at 21:30

Not the answer you're looking for? Browse other questions tagged or ask your own question.