自 xubuntu 16.10 以来,apt-add-repository 通过代理出现问题(在 xubuntu 16.04 中有效)

自 xubuntu 16.10 以来,apt-add-repository 通过代理出现问题(在 xubuntu 16.04 中有效)

我有一个装有 xubuntu 16.04 的虚拟机。自从升级到 16.10 后,我无法添加 ppa(通过 apt-add-repository 命令)

sudo apt-add-repository ppa:x2go/stable
[sudo] password for me: 
 Quick howto to turn your machine into an X2Go server:

sudo apt-add-repository ppa:x2go/stable
sudo apt-get update
sudo apt-get install x2goserver x2goserver-xsession
sudo apt-get install x2gomatebindings  # if you use MATE/mubuntu
sudo apt-get install x2golxdebindings  # if you use LXDE/lubuntu

Quick howto to install the x2goclient:

sudo apt-add-repository ppa:x2go/stable
sudo apt-get update
sudo apt-get install x2goclient

Enjoy!
 More info: https://launchpad.net/~x2go/+archive/ubuntu/stable
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keybox '/tmp/tmpts0fs2o5/pubring.gpg' created
gpg: keyserver receive failed: No route to host

我尝试

sudo -E apt-add-repository ppa:x2go/stable

同样的问题

我的配置代理在 /etc/profile.d/my_conf.sh 中

export http_proxy="http://my.proxy:80"
export https_proxy="http://my.proxy:80"
export ftp_proxy="http://my.proxy:80"
export no_proxy="localhost,127.0.0.1,..."
export HTTP_PROXY="http://my.proxy:80"
export HTTPS_PROXY="http://my.proxy:80"
export FTP_PROXY="http://my.proxy:80"
export NO_PROXY="localhost,127.0.0.1,..."

在 /etc/apt/apt.conf.d/proxy 中

Acquire::http::Proxy "http://my.proxy:80/";
Acquire::https::Proxy "http://my.proxy:80/";
Acquire::ftp::Proxy "http://my.proxy:80/";

我也尝试在 /etc/environment 中添加这个...

http_proxy="http://my.proxy:80"
https_proxy="http://my.proxy:80"
ftp_proxy="http://my.proxy:80"
no_proxy="localhost,127.0.0.1,..."
HTTP_PROXY="http://my.proxy:80"
HTTPS_PROXY="http://my.proxy:80"
FTP_PROXY="http://my.proxy:80"
NO_PROXY="localhost,127.0.0.1,..."

如果我使用以下方式手动添加 gpg 密钥

gpg --import newkey.txt

有用...

我认为问题是由于 xubuntu 16.10 升级导致的 gpg 更新

有人能帮帮我吗?

答案1

Ubuntu 17.04 上也有同样的问题。我不得不手动将存储库添加到 /etc/apt/sources.list

相关内容