在ubuntu上使用apt-get安装软件经常需要先添加PPA,然后才能下载到apt-cache以外的软件。
但是我在输入"sudo add-apt-repository ppa:xxx"以后,会遇到两个问题:1. 长时间没有响应; 2,添加失败(ERROR: user or team does not exist)
以上主要由两种原因导致:
- CA证书损坏;
- 没有绕过代理;
首先我们先重装一遍CA证书:
sudo apt-get install --reinstall ca-certificates
如果还不行,我们就绕过代理,加一个"-E":
sudo -E add-apt-repository --update ppa:ubuntu-toolchain-r/test