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

字號:


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