问题
I am trying to install mongodb 4 on Ubuntu 15.10 but its giving me this error when I start mongod:
Failed to start mongod.service: Unit mongod.service not found
I followed this official installation guide:
https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/
There is no official installation instructions for Ubuntu 15.10
I was successfully able to install on Ubuntu 16 but I am getting issues on Ubuntu 15.10.
回答1:
Since ubuntu 15 isn't officially supported, you might have installed either the version for ubuntu 14 or 16.
Ubuntu possibly upgraded the init system to upstart/systemd (around v15). It's possible that the mongo release for ubuntu 14 varies as in it's packaged for a different init system.
You could write your own init script and install it into /etc/init.d
. Alternatively using process control systems like supervisor
.
Your other option (probably better for security) is to get a new server and migrate there. It could be potentially done without downtime.
回答2:
If Ubuntu 16 isn't working for you, and you need to go back in time to an earlier version, I would choose the previous Long Term Support version, so the last 14.x rather than 15.x.
You are correct in using Mongo 3.6 with Meteor, there are likely to be compatibility issues with 4.0
来源:https://stackoverflow.com/questions/53889589/mongodb-4-failed-to-start-mongod-service-unit-mongod-service-not-found