如何修复安装 Unity Webapps 时出现“无法连接到主机”错误?

如何修复安装 Unity Webapps 时出现“无法连接到主机”错误?

当我尝试安装时出现以下错误Ubuntu 12.04 上的 Unity Web 应用

root@detro-X101H:/home/detro# sudo add-apt-repository ppa:webapps/preview
Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 125, in <module>
    ppa_info = get_ppa_info_from_lp(user, ppa_name)
  File "/usr/lib/python2.7/dist-packages/softwareproperties/ppa.py", line 80, in get_ppa_info_from_lp
    curl.perform()
pycurl.error: (7, "couldn't connect to host")

我的网络连接似乎工作正常。我认为我使用代理服务器。当我apt-get update以 root 身份运行时,我收到这些错误消息 (完整输出在这里):

W: GPG error: http://ppa.launchpad.net precise Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F1773AF13B1510FD
W: GPG error: http://ppa.launchpad.net precise Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8CD60EC948894010
W: GPG error: http://ppa.launchpad.net precise Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6A45934EA9D4C08B
W: GPG error: http://ppa.launchpad.net precise Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY C2518248EEA14886
W: GPG error: http://ppa.launchpad.net precise Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 32B18A1260D8DA0B
W: GPG error: https://private-ppa.launchpad.net precise Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E131728675254D99
W: Failed to fetch http://ppa.launchpad.net/launchpad.net/~scopes-packagers/ubuntu/dists/precise/main/source/Sources  404  Not Found

E: Some index files failed to download. They have been ignored, or old ones used instead.

这是输出cat /etc/apt/sources.list; for X in /etc/apt/sources.list.d/*; do echo; echo; echo "** $X:"; echo; cat $X; done(列出所有启用的软件源)。

我是新的到 Linux,我将根据需要提供更多详细信息。

答案1

最好的客人是您受到 LaunchPad 服务中断或网络问题的影响:

$ sudo add-apt-repository ppa:webapps/preview
You are about to add the following PPA to your system:
 This is the preview for Unity WebApps for Ubuntu Quantal (12.10) Precise (12.04).

To install...

sudo add-apt-repository ppa:webapps/preview
sudo apt-get update
sudo apt-get install unity-webapps-preview
Restart your session (logout and back in)

To uninstall...

sudo apt-get install ppa-purge
sudo ppa-purge ppa:webapps/preview
 More info: https://launchpad.net/~webapps/+archive/preview
Press [ENTER] to continue or ctrl-c to cancel adding it

如您所见,我可以添加存储库。唯一的线索是:

curl.perform()
pycurl.error: (7, "couldn't connect to host")

这意味着 python 的 curl 库无法访问 LP 服务器。

相关内容