linux - centos 中的 yum 错误

标签 linux centos

<分区>

enter image description here

在我编辑了 CentOS-Base.repo 之后。然后出现了一个新的错误。 enter image description here

CentOS-Base.repo文件内容:

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the 
# remarked out baseurl= line instead.
#
#

[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#released updates 
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
#baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

最佳答案

看起来你有一个来自其他地方的 repo 协议(protocol)。

错误是因为指定的 key 文件(不在发布的 CentOS-Base.repo 中)前面没有正确的协议(protocol)说明符。检查其他 .repo 文件并查找一行内容:

gpgkey=///etc/pki/rpm-gpg/RPM-GPG-KEY.art.txt 

并修复它,使其显示为:

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY.art.txt

如果你丢失了文件,你可以这样获取:

wget http://www.atomicrocketturtle.com/RPM-GPG-KEY.art.txt
rpm --import RPM-GPG-KEY.art.txt

关于linux - centos 中的 yum 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6091821/

相关文章:

ftp - 我怎样才能通过FTP访问centOS?

linux - 将多个文件名参数传递给 stat()?

linux - 如何退出终端中的 man 命令

r - 加载 rgdal 时出错

linux - Kubernetes kuberadm 不使用代理

docker - centos 7.3 docker-engine 与 docker-common-2 冲突

centos - Composer 中的 html 净化器特定版本

linux - 运行 bash 脚本时自动打开终端

c - 简单中断处理程序 : request_irq returns error code -22

linux - 按组名、用户名和上次登录 linux 管理用户帐户