解决Hadoop集群搭建NameNode高可用时yum install失败的问题

张开发
2026/4/10 15:20:32 15 分钟阅读

分享文章

解决Hadoop集群搭建NameNode高可用时yum install失败的问题
yum install -y psmisc当执行上诉命令时虚拟机会提示如下错误应为镜像文件出现了问题解决这个问题可能简单替换镜像就行。切换路径到 /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] nameCentOS-$releasever - Base - mirrors.aliyun.com failovermethodpriority baseurlhttp://mirrors.aliyun.com/centos/$releasever/os/$basearch/ http://mirrors.aliyuncs.com/centos/$releasever/os/$basearch/ http://mirrors.cloud.aliyuncs.com/centos/$releasever/os/$basearch/ gpgcheck1 gpgkeyhttp://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7 #released updates [updates] nameCentOS-$releasever - Updates - mirrors.aliyun.com failovermethodpriority baseurlhttp://mirrors.aliyun.com/centos/$releasever/updates/$basearch/ http://mirrors.aliyuncs.com/centos/$releasever/updates/$basearch/ http://mirrors.cloud.aliyuncs.com/centos/$releasever/updates/$basearch/ gpgcheck1 gpgkeyhttp://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7 #additional packages that may be useful [extras] nameCentOS-$releasever - Extras - mirrors.aliyun.com failovermethodpriority baseurlhttp://mirrors.aliyun.com/centos/$releasever/extras/$basearch/ http://mirrors.aliyuncs.com/centos/$releasever/extras/$basearch/ http://mirrors.cloud.aliyuncs.com/centos/$releasever/extras/$basearch/ gpgcheck1 gpgkeyhttp://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7 #additional packages that extend functionality of existing packages [centosplus] nameCentOS-$releasever - Plus - mirrors.aliyun.com failovermethodpriority baseurlhttp://mirrors.aliyun.com/centos/$releasever/centosplus/$basearch/ http://mirrors.aliyuncs.com/centos/$releasever/centosplus/$basearch/ http://mirrors.cloud.aliyuncs.com/centos/$releasever/centosplus/$basearch/ gpgcheck1 enabled0 gpgkeyhttp://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7 #contrib - packages by Centos Users [contrib] nameCentOS-$releasever - Contrib - mirrors.aliyun.com failovermethodpriority baseurlhttp://mirrors.aliyun.com/centos/$releasever/contrib/$basearch/ http://mirrors.aliyuncs.com/centos/$releasever/contrib/$basearch/ http://mirrors.cloud.aliyuncs.com/centos/$releasever/contrib/$basearch/ gpgcheck1 enabled0 gpgkeyhttp://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7修改完毕后保存就可以执行yum install 命令了。修改为国内的镜像网站就可以解决。

更多文章