我试图使用gksudo gedit /etc/apt/apt.conf设置代理服务器,并尝试添加命令,就像在‘’不适用于代理中一样
Acquire::http::Proxy "http://user:pass@proxy-host:port/";
Acquire::ftp::Proxy "http://user:pass@proxy-host:port/"; 当我尝试这样做时,终端上会出现一条消息。
/usr/share/themes/Ambiance/gtk-2.0/apps/mate-panel.rc:30: error: invalid string constant "murrine-scrollbar", expected valid string constant
Error copying '/home/dipesh/.Xauthority' to '/tmp/libgksu-FU5d7j': No such file or directory 屏幕上有消息
Failed to run gedit '/etc/apt/apt.conf' as user root.
Unable to copy the user's Xauthorization file.当我手动尝试添加apt.conf文件时,它拒绝消息传递。
您没有保存文件所需的权限。请检查键入的位置是否正确,然后再试一次。
当我尝试这个时,它起作用了。
sudo env http_proxy=http://<ip>:<port> apt-get update但sudo apt-get update或sudo add-apt-repository ppa:webupd8team/sublime-text-3或
sudo env http_proxy=http://10.7.0.1:8080 apt-repository ppa:webupd8team/sublime-text-3不起作用。
我是Ubuntu的新手,请帮帮忙!
发布于 2017-12-20 08:09:24
尝尝这个
# create file:
sudo vim /etc/apt/apt.conf.d/80proxy
# with this inside file
Acquire::http::Proxy "http://user:pass@proxy-host:port/";https://askubuntu.com/questions/979901
复制相似问题