我正在尝试在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,并使用适当的值进行设置。
答案 0 :(得分:0)
我在Mint 17上遇到了这个错误,它似乎发生在Ubuntu 14.04中。这是一个已知错误(请参阅here和here)。
我要解决的是:
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。