blog icon indicating copy to clipboard operation
blog copied to clipboard

centos 安装 mongodb 报错 Error importing repomd.xml for mongodb-org-4.0: Damaged repomd.xml file

Open wuweijia opened this issue 4 years ago • 0 comments

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

wuweijia avatar Aug 26 '20 03:08 wuweijia