从 ubuntu 卸载 mongoDB [英] Uninstall mongoDB from ubuntu
问题描述
我已经按照 Install MongoDB 中的命令安装了 MongoDB 3.0.1Ubuntu 社区版 在我的 ubuntu 14.04 64 位系统上,我安装了 Robomongo 界面来使用它.
I have installed MongoDB 3.0.1 following the commands in Install MongoDB Community Edition on Ubuntu on my ubuntu 14.04 64 bit system and I installed Robomongo interface to use that.
当我尝试使用 Robomongo 连接 MongoDB 时,出现授权失败的错误.我发现 Add support for SCRAM-SHA-1 authentication (MongoDB 3.0+) 这解释了Robomongo 0.8.5 不完全支持 MongoDB 3.0.X.
When I try to connect MongoDB using Robomongo I get an error that authorization failed. I found Add support for SCRAM-SHA-1 authentication (MongoDB 3.0+) which explains that Robomongo 0.8.5 doesn't support MongoDB 3.0.X fully.
作为回应,我想删除 MongoDB 3.0.1 并安装 MongoDB 2.2.
In response, I want to remove MongoDB 3.0.1 and install MongoDB 2.2.
我尝试了以下命令:
apt-get remove --purge mongodb
还有
apt-get autoremove --purge mongodb
在这两种情况下,我都收到以下错误:
In both cases I got the following error:
" 无法打开锁定文件/var/lib/dpkg/lock - open (13: Permission denied)E: 无法锁定管理目录 (/var/lib/dpkg/),您是 root 吗?"
" Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?"
任何帮助将不胜感激.
推荐答案
sudo service mongod stop
sudo apt-get purge mongodb-org*
sudo rm -r /var/log/mongodb
sudo rm -r /var/lib/mongodb
这对我有用
这篇关于从 ubuntu 卸载 mongoDB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!