简体   繁体   中英

How to Uninstall MongoDb-Server on CentOS

I have installed a mongodb instance once, but it stops running for a reason that I could not managed to solve. So I installed MongoDb 3.4 by using offical docs . There are 5 modules according to the installer. One of them is mongodb-org-server which install mongod (mongo daemonized). When I run the command:

sudo yum install -y mongodb-org

It installs all of modules except mongodb-org-server. It says it's installed. However, when I run mongod, I get there is no such a command. After that I tried to remove all of the modules:

sudo yum erase $(rpm -qa | grep mongodb-org)

It does not manage to remove mongodb-org-server and throws the error below:

Running Transaction
Erasing: mongodb-org-3.4.1-1.el6.x86_64                                                                                                                                1/5
error reading information on service mongod: No such file or directory
error: %preun(mongodb-org-server-3.4.1-1.el6.x86_64) scriptlet failed, exit status 1
Error in PREUN scriptlet in rpm package mongodb-org-server

How I can fix this? I'll glad for your helps. Thanks.

I fixed the issue. Reinstalled the server package and deleted successfully.

sudo yum reinstall -y mongodb-org-server.x86_64

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM