How I fix my broken mongodb installation in Linux (Ubuntu)

Beatriz Oliveira
2 min readMar 4, 2021

--

Photo by Sai Kiran Anagani on Unsplash

If you use Linux and want install the mongodb, be careful not to make the same mistakes I made.

First I followed this step by step from the mongodb for linux documentation

https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/

But it appeared in the terminal that dependencies were mismatched, I tryed anyhow fix using APT, but not success.

When I got there, I got the dependencies error :

After much research, I found a site that had this problem solved:

https://ubuntuforum-br.org/index.php?topic=120126.0

But the sudo apt command wasn’t working either, so I used the sudo kpg command and managed to uninstall the broken dependencies:

sudo dpkg -r mongodb-org

If it doesn’t work, try it:

sudo dpkg --purge mongodb-org

then use it:

sudo apt update

and

sudo apt upgrade

With that mongobd-org was uninstalled, in case you get an error reading the sudo apt commands see this discussion page, it helped me:

https://plus.diolinux.com.br/t/erro-com-o-meu-linux-ubuntu/10320/5

And finally try to install mongodb again by following these steps:

https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/

mongodb guide to errors:

https://docs.mongodb.com/manual/reference/installation-ubuntu-community-troubleshooting/#install-ubuntu-troubleshooting

--

--

Beatriz Oliveira
Beatriz Oliveira

No responses yet