我在往一个正常运行的CDH集群时,发生错误:
异常信息:
yum-config-manager --save --setopt=rhel7.skip_if_unavailable=true
failure: repodata/repomd.xml from rhel7: [Errno 256] No more mirrors to try.
file:///media/cdrom/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /media/cdrom/repodata/repomd.xml"
END (1)
remote package oracle-j2sdk1.8 could not be installed, giving up
waiting for rollback request
异常信息:
yum-config-manager --save --setopt=rhel7.skip_if_unavailable=true
failure: repodata/repomd.xml from rhel7: [Errno 256] No more mirrors to try.
file:///media/cdrom/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /media/cdrom/repodata/repomd.xml"
END (1)
remote package oracle-j2sdk1.8 could not be installed, giving up
waiting for rollback request
我人工检测到在安装过程当中 repomd.xml所在的位置 是
/var/cache/yum/x86_64/7Server/cloudera-manager/repomd.xml
/var/cache/yum/x86_64/7Server/elrepo/repomd.xml
/var/cache/yum/x86_64/7Server/epel/repomd.xml
疑惑:
但是安装程序为什么要去/media/cdrom/repodata/这个目录下录找repomd.xml文件呢
/media/cdrom/目录明明是LINUX 光驱所有在映射,我是CDH 新增节点,这与光驱有什么关系呢?实在不明白
谁能帮我解决这个问题。
镜像源不可用,可以考虑换个镜像源试试。报错信息的意思是:远程镜像源找不到相应的文件,然后去默认的本地路径去寻找,如果你本地用的话,修改一下默认的本地路径就可以了。
是不是没有挂载镜像?
你把你的yun源配置文件换一下试试。
先卸载本机系统的yum源(我的是Centos7.8)
rpm -aq|grep yum
rpm -e 搜出来的yum源 --nodeps ( --nodeps作用是过滤删除时的详情)
根据自己系统版本找到centos官方镜像站相对应的yum源
cat /etc/centos-release
file /bin/ls
http://mirrors.ustc.edu.cn/help/centos.html
-e 's|^#baseurl=http://mirror.centos.org/centos|baseurl=https://mirrors.ustc.edu.cn/centos|g'
-i.bak
/etc/yum.repos.d/CentOS-Base.repo
`
`
# Centos7 修改 vi /etc/yum.repos.d/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&infra=$infra
baseurl=https://mirrors.ustc.edu.cn/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#released updates
[updates]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
baseurl=https://mirrors.ustc.edu.cn/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
baseurl=https://mirrors.ustc.edu.cn/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
baseurl=https://mirrors.ustc.edu.cn/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
# 这是centos官方镜像站yum的依赖, 选择自己的版本,我是把yum开头的全下了
https://mirrors.ustc.edu.cn/centos/7.8.2003/os/x86_64/Packages/
wget https://mirrors.ustc.edu.cn/centos/7.8.2003/os/x86_64/Packages/yum-NetworkManager-dispatcher-1.1.31-53.el7.noarch.rpm
wget https://mirrors.ustc.edu.cn/centos/7.8.2003/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
wget https://mirrors.ustc.edu.cn/centos/7.8.2003/os/x86_64/Packages/yum-cron-3.4.3-167.el7.centos.noarch.rpm
# 安装yum依赖包:
rpm -ivh |grep yum-**
yum clean all
yum clean metadata
yum update
集群配置有问题
oracle-j2sdk1.8这个需要安装
先配置好机器上的YUM源,如果本地光盘源没有用,你可以先mv一下或者直接删除。
看你报错,去找了本地源。
源配置不对,找不到源