使用apt-get安裝軟件經常需要先添加PPA,這樣才能下載到apt-cache以外的軟件。
然而,我在輸入"sudo add-apt-repository ppa:xxx"以後,會遇到兩個問題:1. 長時間沒有響應; 2,添加失敗(ERROR: user or team does not exist)
以上主要由兩種原因導致:1. CA證書損壞;2. 沒有繞過代理;
我們先重裝一遍CA證書:
sudo apt-get install --reinstall ca-certificates
如果還不行,我們就繞過代理,加一個"-E":
sudo -E add-apt-repository --update ppa:ubuntu-toolchain-r/test
我採用上述2步,解決了困擾我好幾個月的問題~
非常感謝這篇文章:https://blog.bflyer.com/2016/03/27/Fix-Cannot-Add-PPA-Error-In-Ubuntu-14-04-Linux-Mint-17/