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

如何解決yum無法安裝epel-release的問題

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

yum無法安裝epel-release

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

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

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

嘗試了第一種方法

修改了/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è)命令就都加載失敗了,我覺得就是這個(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)論

玛多县| 青冈县| 开江县| 革吉县| 玉门市| 嫩江县| 九寨沟县| 婺源县| 上虞市| 新宁县| 广河县| 临沂市| 三穗县| 习水县| 贵定县| 朝阳县| 安庆市| 怀化市| 嘉禾县| 宁陕县| 龙门县| 珠海市| 崇阳县| 建始县| 肥东县| 伊金霍洛旗| 富锦市| 遂昌县| 玉林市| 台南县| 巴青县| 乐安县| 满洲里市| 东乡族自治县| 临漳县| 庐江县| 南城县| 黄梅县| 区。| 沅陵县| 湄潭县|