LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 651|回复: 2

求教:apt-get无法挂载到代 理

[复制链接]
发表于 2009-3-11 02:30:24 | 显示全部楼层 |阅读模式
由于网络限制,无法直接连接网络,只能通过代 理。

系统为debian 5.0

设置gnome网络代 理之后 冰釉 w3m ...... 均可以连接internet 唯独apt-get这个重要的命令不能使用网络

问题在于apt-get在完成DNS解析之后是直接连接的,不通过代 理服务器,

查google 获得信息:
  增加 /etc/apt/apt.conf 文件
  内容:Acquire::http::proxy http://username:password@proxy_adress:port_number;
以及
  export http_proxy=http://username:password@proxy_address:port_number

尝试这两种方法都没有作用。

[color="Red"]晕阿!
论坛竟然将“代 理”视为非法词语!!!
发表于 2009-3-11 08:47:27 | 显示全部楼层
给你个我的例子哈。。。

$ cat /etc/apt/apt.conf

Acquire
{

  // HTTP method configuration
  http
  {
    Proxy "http://1.1.4.2:14";
  };


};
回复 支持 反对

使用道具 举报

发表于 2009-3-11 21:27:29 | 显示全部楼层
Post by 职业小白鼠;1959037
由于网络限制,无法直接连接网络,只能通过代 理。

系统为debian 5.0

设置gnome网络代 理之后 冰釉 w3m ...... 均可以连接internet 唯独apt-get这个重要的命令不能使用网络

问题在于apt-get在完成DNS解析之后是直接连接的,不通过代 理服务器,

查google 获得信息:
  增加 /etc/apt/apt.conf 文件
  内容:Acquire::http::proxy http://username:password@proxy_adress:port_number;
以及
  export http_proxy=http://username:password@proxy_address:port_number

尝试这两种方法都没有作用。

[color="Red"]晕阿!
论坛竟然将“代 理”视为非法词语!!!

会否是 sources.list 里的源域名解释不了?看看这招有用否?

http://www.linuxsir.cn/bbs/thread332733.html
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表