解決CentOS的yum無法安裝https來源的epel問題

字號(hào):


    yum安裝NodeJS在訪問鏡像列表時(shí)出現(xiàn)404,升級(jí)yum更新epel之后則出現(xiàn)這個(gè)錯(cuò)誤:
    “Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again”
    通過Google得知:原因
    yum-epel升級(jí)到0.5.2版本,更換了https鏈接,所以原來的鏡像列表就過時(shí)了,砸地。
    解決方法是,運(yùn)行:yum –disablerepo=epel -y update ca-certificates
    記住一定要加上–disablerepo=epel,否則怎么都更新不了
    當(dāng)然你閑得蛋疼也可以手動(dòng)去改鏡像列表。
    這個(gè)問題說明了不會(huì)用Google害死人,百度可以再見了。