最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

如何解決yum無(wú)法安裝epel-release的問(wèn)題

 更新時(shí)間:2025年05月26日 16:53:55   作者:花不完根本花不完  
這篇文章主要介紹了如何解決yum無(wú)法安裝epel-release的問(wèn)題,具有很好的參考價(jià)值,希望對(duì)大家有所幫助,如有錯(cuò)誤或未考慮完全的地方,望不吝賜教

yum無(wú)法安裝epel-release

在學(xué)習(xí)Hadoop的過(guò)程中準(zhǔn)備環(huán)境時(shí)需要安裝epel-release

在安裝之前ping了一下www.baidu.com 發(fā)現(xiàn)能ping通,然后就去安裝了,然后就發(fā)現(xiàn)問(wèn)題了

去網(wǎng)上搜了一下然后感覺(jué)應(yīng)該是鏡像源的問(wèn)題,

嘗試了第一種方法

修改了/etc/yum.repos.d目錄下的CentOS-Base.rep文件,將文件中的原有內(nèi)容改為

# 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=http://mirror.centos.org/centos/$releasever/os/$basearch/
    #baseurl=http://vault.centos.org/7.9.2009/x86_64/os/
    baseurl=http://vault.centos.org/7.9.2009/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=http://mirror.centos.org/centos/$releasever/updates/$basearch/
    #baseurl=http://vault.centos.org/7.9.2009/x86_64/os/
    baseurl=http://vault.centos.org/7.9.2009/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=http://mirror.centos.org/centos/$releasever/extras/$basearch/
    #baseurl=http://vault.centos.org/7.9.2009/x86_64/os/
    baseurl=http://vault.centos.org/7.9.2009/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=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
    #baseurl=http://vault.centos.org/7.9.2009/x86_64/os/
    baseurl=http://vault.centos.org/7.9.2009/centosplus/$basearch/
    gpgcheck=1
    enabled=0
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

然后執(zhí)行

sudo yum clean all
sudo yum makecache

然后我的這兩個(gè)命令就都加載失敗了,我覺(jué)得就是這個(gè)不行

但是我把后續(xù)的解決方法放到下面,有人成功了可以繼續(xù)往下試試

再執(zhí)行

curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo

然后查看一下CentOS-Base.repo`中的地址是否改成阿里云的了

cat CentOS-Base.repo`

再此嘗試導(dǎo)入wget命令 好的成功了

第二種方法(我就是用這種方法解決的)

#建議是備份一下

rm -rf /etc/yum.repos.d mkdir /etc/yum.repos.d

wget http://mirrors.aliyun.com/repo/Centos-7.repo cp Centos-7.repo /etc/yum.repos.d/CentOS-Base.repo

#安裝 rpm -ivh wget-1.14-15.el7_4.1.x86_64.rpm

yum clean all yum makecache

總結(jié)

以上為個(gè)人經(jīng)驗(yàn),希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。

相關(guān)文章

最新評(píng)論

民勤县| 和平县| 上杭县| 邳州市| 平度市| 剑川县| 齐河县| 通州区| 阳信县| 黔西县| 左云县| 郴州市| 平安县| 蒙阴县| 女性| 宁津县| 武功县| 瑞昌市| 乌恰县| 长乐市| 隆昌县| 舟曲县| 涡阳县| 石台县| 无锡市| 龙江县| 安乡县| 虞城县| 武城县| 瑞安市| 淳安县| 东港市| 常熟市| 安新县| 天长市| 岳池县| 兰考县| 临澧县| 甘德县| 藁城市| 根河市|