apt-get install proxy 问题:没有那个文件或目录

apt-get install proxy 问题:没有那个文件或目录

我似乎无法使用 apt 安装任何东西。我猜这是代理问题,但我检查了一下,/etc/environment并提供了所有必要的代理信息。我附上了一张我遇到的错误的图片。非常感谢您的帮助。谢谢。

$ sudo apt-get install install-info
Reading package lists... Done
Building dependency tree       
Reading state information... Done
install-info is already the newest version.
The following packages were automatically installed and are no longer required: 
0ad-data 0ad-data-common fonts-texgyre libenet2a libglc0 libglewmx1.10
libgloox11 libnvtt2 libphysfs1 tex-common warzone2100-data
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 334 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up install-info (5.2.0.dfsg.1-2) ...
/etc/environment: line 2: http://proxy.iiit.ac.in:8080:: No such file or directory
dpkg: error processing package install-info (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
install-info
E: Sub-process /usr/bin/dpkg returned an error code (1)

我的环境变量的内容是:

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
http_proxy= "http://proxy.iiit.ac.in:8080:"
https_proxy= "http://proxy.iiit.ac.in:8080:"
ftp_proxy= "http://proxy.iiit.ac.in:8080:"
no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"
HTTP_PROXY= "http://proxy.iiit.ac.in:8080:"
HTTPS_PROXY="http://proxy.iiit.ac.in:8080:"
FTP_PROXY="http://proxy.iiit.ac.in:8080:"
NO_PROXY="localhost,127.0.0.1,localaddress,.localdomain.com"

答案1

一些变量赋值在 后面有空格=。 不应该有空格。 它们应该看起来像:

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
http_proxy="http://proxy.iiit.ac.in:8080:"
https_proxy="http://proxy.iiit.ac.in:8080:"
ftp_proxy="http://proxy.iiit.ac.in:8080:"
no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"
HTTP_PROXY="http://proxy.iiit.ac.in:8080:"
HTTPS_PROXY="http://proxy.iiit.ac.in:8080:"
FTP_PROXY="http://proxy.iiit.ac.in:8080:"
NO_PROXY="localhost,127.0.0.1,localaddress,.localdomain.com"

答案2

您的代理不正确:“http://proxy.iiit.ac.in:8080:”

必须是 => "http://proxy.iiit.ac.in:8080“<-没有最后一个冒号

相关内容