LinuxSir.cn,穿越时空的Linuxsir!

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

在单位用代理,我的apt.conf那不对啊,apt-get没用代理

[复制链接]
发表于 2003-1-17 13:13:10 | 显示全部楼层 |阅读模式
MyDebian:/etc/apt# more apt.conf

Acquire
{
  http
  {
    Proxy "http://192.168.0.1:8080";
  };
  ftp
  {
    Proxy "ftp://192.168.0.1:8021";
  };
};
 楼主| 发表于 2003-1-17 13:15:07 | 显示全部楼层
sources.list

deb ftp://ftp.linuxforum.net/debian unstable main contrib
 楼主| 发表于 2003-1-17 13:27:28 | 显示全部楼层
设置环境变量的法子可以,export http_proxy ftp_proxy,
但是apt.conf为什么不灵?
发表于 2003-1-17 14:23:05 | 显示全部楼层
代理的情况我没有遇到过哦。你是你那样设置好像是不对的。
 楼主| 发表于 2003-1-17 14:31:08 | 显示全部楼层
man /usr/share/doc/apt/examples/*gz
里面有个例子,就是这么写的啊?
发表于 2003-1-17 18:32:28 | 显示全部楼层
写的是对的。
但是,为什么不行,怎么提示的呢?
 楼主| 发表于 2003-1-18 10:02:55 | 显示全部楼层
没有提示,apt-get install的输出显示根本没有去连接代理,直接报错网络不可达。困惑ing...
发表于 2003-1-18 13:07:19 | 显示全部楼层
應該這樣:
Acquire: :http: :proxy "http://proxyname.com:8080";
发表于 2003-1-18 13:20:59 | 显示全部楼层

Re: 在单位用代理,我的apt.conf那不对啊,apt-get没用代理

最初由 sword2k 发布
MyDebian:/etc/apt# more apt.conf

Acquire
{
  http
  {
    Proxy "http://192.168.0.1:8080";
  };
  ftp
  {
    Proxy "ftp://192.168.0.1:8021";
  };
};


看了应该没什么问题,如果你在debian中能上网了,那么问题应该不大吧!
发表于 2003-1-21 10:21:21 | 显示全部楼层
我是这样解决的
将apt.conf备份出来(保险嘛)
然后将其内容清空
运行apt-setup
选择http,然后就看到代理的对话框了,填入代理的地址和端口就可以了。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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