1

So when I type: sudo update-rc.d mongod defaults

I get:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LC_MEASUREMENT = "he_IL.UTF-8",
    LC_PAPER = "he_IL.UTF-8",
    LC_MONETARY = "he_IL.UTF-8",
    LC_NAME = "he_IL.UTF-8",
    LC_ADDRESS = "he_IL.UTF-8",
    LC_NUMERIC = "he_IL.UTF-8",
    LC_TELEPHONE = "he_IL.UTF-8",
    LC_IDENTIFICATION = "he_IL.UTF-8",
    LC_TIME = "he_IL.UTF-8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
update-rc.d: error: unable to read /etc/init.d/mongod

When I type:sudo update-rc.d mongod enable

I get:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LC_MEASUREMENT = "he_IL.UTF-8",
    LC_PAPER = "he_IL.UTF-8",
    LC_MONETARY = "he_IL.UTF-8",
    LC_NAME = "he_IL.UTF-8",
    LC_ADDRESS = "he_IL.UTF-8",
    LC_NUMERIC = "he_IL.UTF-8",
    LC_TELEPHONE = "he_IL.UTF-8",
    LC_IDENTIFICATION = "he_IL.UTF-8",
    LC_TIME = "he_IL.UTF-8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
update-rc.d: error: cannot find a LSB script for mongod

I also found out that: sudo ls -al /etc/init.d/ | grep mongod returns nothing. Any ideas what's going on?

migrated from askubuntu.com Jul 31 '17 at 22:45

This question came from our site for Ubuntu users and developers.

  • Lets check its status first systemctl status mongodb – George Udosen Jul 31 '17 at 23:10
1

when I type: sudo update-rc.d mongod defaults

Do not do that. update-rc.d is not a tool for you to run directly. It is for maintainer scripts. On a systemd operating system like yours, use systemctl enable and systemctl disable.

When I type: sudo update-rc.d mongod enable

The service is not named mongod on Debian in any case. mongod is the service name used in the service definitions provided by the MongoDB developers. But Debian supplies its own service definitions, and on Debian the service is named mongodb.

sudo ls -al /etc/init.d/ | grep mongod returns nothing

This is a symptom of your not having installed the mongodb-server package in the first place.

The perl messages about your locale are a red herring, and are almost certainly a result of Debian bug #868695. A local fix is to ensure that your LANGUAGE and LC_ALL variables are also set by your shell's login script; but this isn't anything to do with your service units and missing files.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy