我尝试让 Ubuntu 16.04 (xenial) 的编译器高于 gcc/gpp-5。
我将这些行添加到 /etc/apt/sources.list
deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial main
deb-src http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial main
deb http://ppa.launchpad.net/jonathonf/gcc/ubuntu xenial main
deb-src http://ppa.launchpad.net/jonathonf/gcc/ubuntu xenial main
之后运行“apt update”时,我得到了这个:
Err:9 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 1E9377A2BA9EF27F
Err:16 http://ppa.launchpad.net/jonathonf/gcc/ubuntu xenial InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8CF63AD3F06FC659
然后我尝试添加键:
# apt-key adv --keyserver keyserver.ubuntu.com --recv-key 1E9377A2BA9EF27F
Executing: /tmp/tmp.hQqulW3vSQ/gpg.1.sh --keyserver
keyserver.ubuntu.com
--recv-key
1E9377A2BA9EF27F
> gpg: requesting key BA9EF27F from hkp server keyserver.ubuntu.com
gpgkeys: key 1E9377A2BA9EF27F not found on keyserver
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
gpg: keyserver communications error: key not found
gpg: keyserver communications error: bad public key
gpg: keyserver receive failed: bad public key
# apt-key adv --keyserver keyserver.ubuntu.com --recv-key 8CF63AD3F06FC659
Executing: /tmp/tmp.9sbMVJgRDb/gpg.1.sh --keyserver
keyserver.ubuntu.com
--recv-key
8CF63AD3F06FC659
gpg: requesting key F06FC659 from hkp server keyserver.ubuntu.com
gpgkeys: key 8CF63AD3F06FC659 not found on keyserver
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
gpg: keyserver communications error: key not found
gpg: keyserver communications error: bad public key
gpg: keyserver receive failed: bad public key
如何简单地为该平台获取一组更新的编译器?
我发现在防火墙后面很难实现这样的目标。标准食谱不起作用,甚至“sudo -E”对我来说都失败了。而且我目前不知道如何改进 apt-* 工具集的调试打印。