Mongodb安装报错https://repo.mongodb.org/yum/redhat/#releasever/mongodb-org/4.0/x86_64/repodata/repomd.xml: [Errno -1] Error importing repomd.xml for mongodb-org-4.0: Damaged repomd.xml file

解决方法:

sudo rm -rf /etc/yum.repos.d/mongod*
sudo yum clean all
然后重新创建源文件
vim /etc/yum.repos.d/mongodb-org-4.0.repo

[mongodb-org-4.0]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.0/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.0.asc

yum install -y mongodb-org


posted @ 2019-11-14 15:35  qinliang  阅读(2020)  评论(0编辑  收藏  举报