0

I am trying to install MongoDB as per instructions provided in their documentation.

I am getting this error and I am unable to resolve this issue. Any help in this regards will be highly appreciated:

The commands I am running are as under:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4

For Ubuntu 18 LTS:

echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list

And Then:

 sudo apt-get update

And Then:

sudo apt-get install -y mongodb-org

After running above mentioned command i get this error:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libcurl4 mongodb-org-mongos mongodb-org-server mongodb-org-shell
  mongodb-org-tools
The following NEW packages will be installed:
  libcurl4 mongodb-org mongodb-org-mongos mongodb-org-server mongodb-org-shell
  mongodb-org-tools
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/56.0 MB of archives.
After this operation, 241 MB of additional disk space will be used.
dpkg: unrecoverable fatal error, aborting:
 unknown user 'mongodb' in statoverride file
E: Sub-process /usr/bin/dpkg returned an error code (2)

Your Answer

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

Browse other questions tagged or ask your own question.