安装 Jenkins 后,Yum 存储库损坏

安装 Jenkins 后,Yum 存储库损坏

我安装了 apache 和 jenkins,现在当我运行 yum 命令时,我收到 repo 错误。我是 redhead 的新手,所以我很难找到我哪里出错了。

以下是尝试安装 git 的一个示例:

# yum install git
Loaded plugins: security
file:///mnt/cdrom/Server/repodata/repomd.xml: [Errno 5] OSError: [Errno 2] No such file or directory: '/mnt/cdrom/Server/repodata/repomd.xml'
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: Server. Please verify its path and try again

我的 yum.conf 如下所示

[main]
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
metadata_expire=1800

[base]
name=CentOS-5 Base
baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=0

[Server]
name=Enterprise Linux 5 Update 6
baseurl=file:///mnt/cdrom/Server/

[VT]
name=Enterprise Linux 5 Update 6
baseurl=file:///mnt/cdrom/VT/

;[Cluster]
;name=Enterprise Linux 5 Update 6
;baseurl=file:///mnt/cdrom/Cluster/

;[ClusterStorage]
;name=Enterprise Linux 5 Update 6
;baseurl=file:///mnt/cdrom/ClusterStorage/

;[updates]
;name=Enterprise Linux 5 Update 6
;baseurl=file:///mnt/cdrom/updates/OEL5-u6-x86_64/

;[companion]
;name=Enterprise Linux 5 Update 6 - Companion
;baseurl=file:///mnt/cdrom/companion/OEL5-u6/

我的额外 repo 文件:vim public-yum-el5.repo

[el5_latest]
name=Oracle Linux $releasever Latest ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL5/latest/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[el5_ga_base]
name=Oracle Linux $releasever GA installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/0/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[el5_u1_base]
name=Enterprise Linux $releasever Update 1 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/1/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[el5_u2_base]
name=Enterprise Linux $releasever Update 2 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/2/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[el5_u3_base]
name=Enterprise Linux $releasever Update 3 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/3/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[el5_u4_base]
name=Enterprise Linux $releasever Update 4 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/4/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[el5_u5_base]
name=Enterprise Linux $releasever Update 5 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/5/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[ol5_u5_base]
name=Oracle Linux $releasever Update 5 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL5/5/base/x86_64/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[ol5_u6_base]
name=Oracle Linux $releasever Update 6 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL5/6/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1

答案1

看起来/mnt/cdrom/目录中什么都没有。这就是 Yum 给出以下错误的原因:

No such file or directory

相关内容