可能重复:
apt-get 不适用于代理
我尝试将终端中的代理设置更改为:
export HTTP_PROXY=http://10.1.3.1:8080
Run Code Online (Sandbox Code Playgroud)
和
export http_proxy=http://10.1.3.1:8080
Run Code Online (Sandbox Code Playgroud)
但是当我尝试安装新软件包或更新 apt-get 时,apt-get 开始显示似乎正在尝试连接到先前设置的代理的消息:
sudo apt-get update
0% [Connecting to 10.1.2.2 (10.1.2.2)] [Connecting to 10.1.2.2 (10.1.2.2)
Run Code Online (Sandbox Code Playgroud)
我曾尝试通过 bashrc 文件设置代理,但该 din 也可以工作。据我所知,10.1.2.2 是使用 GNOME GUI 设置的,但我现在无法访问 GUI,所以我试图从终端设置它。
我在安装任何程序时遇到问题。我得到一个错误Sub-process /usr/bin/dpkg returned an error code (1)。以下是输出的日志apt-get -f install。知道我的包管理器有什么问题吗?
tahir@tahir-Inspiron-1564:/var/www$ sudo apt-get -f install
[sudo] password for tahir:
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 24 not upgraded.
5 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Setting up linux-image-2.6.35-27-generic (2.6.35-27.48) ...
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.35-27-generic
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/dkms 2.6.35-27-generic /boot/vmlinuz-2.6.35-27-generic
* …Run Code Online (Sandbox Code Playgroud)