【问题标题】:Installing packages which downloads files in Ubuntu 14.04安装在 Ubuntu 14.04 中下载文件的软件包
【发布时间】:2015-09-09 01:01:50
【问题描述】:

我正在尝试在 Ubuntu 14.04 中安装以下软件包,但出现以下错误:

ttf-mscorefonts-installer: downloading    
http://downloads.sourceforge.net/corefonts/andale32.exe
Traceback (most recent call last):
File "/usr/lib/update-notifier/package-data-downloader", line 239, in    
process_download_requests
dest_file = urllib.urlretrieve(files[i])[0]
File "/usr/lib/python2.7/urllib.py", line 94, in urlretrieve
return _urlopener.retrieve(url, filename, reporthook, data)
File "/usr/lib/python2.7/urllib.py", line 240, in retrieve
fp = self.open(url, data)
File "/usr/lib/python2.7/urllib.py", line 208, in open
return getattr(self, name)(url)
File "/usr/lib/python2.7/urllib.py", line 345, in open_http
h.endheaders(data)
File "/usr/lib/python2.7/httplib.py", line 969, in endheaders
self._send_output(message_body)
File "/usr/lib/python2.7/httplib.py", line 829, in _send_output
self.send(msg)
File "/usr/lib/python2.7/httplib.py", line 791, in send
self.connect()
File "/usr/lib/python2.7/httplib.py", line 772, in connect
self.timeout, self.source_address)
File "/usr/lib/python2.7/socket.py", line 553, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
IOError: [Errno socket error] [Errno -2] Name or service not known
Processing triggers for fontconfig (2.11.0-0ubuntu4.1) ...
Setting up ttf-mscorefonts-installer (3.4+nmu1ubuntu1) ...

我在代理服务器后面工作,但代理设置对于所有其他软件包安装都可以正常工作。安装 flashplugin-installer 时,我也遇到了同样的错误。我检查了环境变量,即 http_proxy、https_proxy 和 ftp_proxy,它们设置了适当的值。

【问题讨论】:

    标签: package ubuntu-14.04


    【解决方案1】:

    我在使用 Mint 17 时遇到了这个错误,它似乎发生在 Ubuntu 14.04 中。这是一个已知的错误(参见herehere)。

    我解决的是:

    sudo su
    

    如果您是代理,则需要身份验证:

    export http_proxy=http://<username>:<password>@<your_proxy>:<proxy_port>
    

    如果我不需要身份验证:

    export http_proxy=http://<your_proxy>:<proxy_port>
    

    最后像往常一样安装软件包

    apt-get install <package_to_install>
    

    如果您已经安装过,请重新安装该软件包

    apt-get install --reinstall <package_to_install>
    

    我使用 ttf-mscorefonts-installer 进行了测试,但我想它也应该适用于 flashplugin-installer。

    【讨论】:

      猜你喜欢
      • 2014-04-28
      • 2020-05-31
      • 1970-01-01
      • 2015-09-08
      • 1970-01-01
      • 2014-08-18
      • 2017-03-22
      相关资源
      最近更新 更多