LinuxSir.cn,穿越时空的Linuxsir!

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

这里没有一个pacman需要代理的么?

[复制链接]
发表于 2006-3-24 18:25:16 | 显示全部楼层 |阅读模式
难道只有我们学校这么痛苦?
为什么我在~/.bashrc里设置了代理,pacman怎么都连不上??
任何源都连不上....

大家都是不需要代理的,没有一个是需要用代理上网的么?能告诉我应该怎么样么?

我在文字界面下一天了,而且默认的bash没有telnet,没有ssh....
什么都上不了...郁闷...
发表于 2006-3-24 18:56:57 | 显示全部楼层
在pacman.conf中设代理.
具体man 之
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-3-24 19:00:27 | 显示全部楼层
man what???谢谢
回复 支持 反对

使用道具 举报

发表于 2006-3-24 19:02:43 | 显示全部楼层
man中我看了下,好像没有关于设置代理方面的吧?
回复 支持 反对

使用道具 举报

发表于 2006-3-24 19:04:45 | 显示全部楼层

  1. man pacman

  2. ProxyServer = <host|ip>[:port]
  3.               If set, pacman will use this proxy server for all ftp/http transfers.
复制代码
回复 支持 反对

使用道具 举报

发表于 2006-3-24 19:23:24 | 显示全部楼层
[nicholas@19:24:37 ~]$ head -25 /etc/pacman.conf
#
# /etc/pacman.conf
#
# NOTE: If you find a mirror that is geographically close to you, please
#       move it to the top of the server list, so pacman will choose it
#       first.
#
# To re-sort your mirror lists by ping/traceroute results, use the
# /usr/bin/sortmirrors script.  It requires the "netselect" package.
#

# See the pacman manpage for option directives

#
# GENERAL OPTIONS
#
[options]
LogFile     = /var/log/pacman.log
NoUpgrade   = etc/passwd etc/group etc/shadow etc/sudoers
NoUpgrade   = etc/fstab etc/raidtab etc/ld.so.conf
NoUpgrade   = etc/rc.conf etc/rc.local
NoUpgrade   = etc/modprobe.conf etc/modules.conf
NoUpgrade   = etc/lilo.conf boot/grub/menu.lst
HoldPkg     = pacman glibc
[color="Red"]ProxyServer = 10.214.18.98:5257
[nicholas@19:24:43 ~]$
回复 支持 反对

使用道具 举报

发表于 2006-3-24 19:25:40 | 显示全部楼层
顺便说一下,pacman对代理的支持不是很好,不支持带用户名和密码的。

对此,pacman支持使用别的工具来下载包,从而可以使用代理,比如wget.

或者直接使用tsocks pacman 来更新
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-3-24 19:26:49 | 显示全部楼层
恩,好象有点意思了
不过好象没有说,这个代理如果要身份验证怎么办?
我用ProxyServer=http://xxx:xxxx@代理地址:断口
不行,可能是这个写法有问题
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-3-24 19:34:07 | 显示全部楼层
问7楼,我现在是想安装kde,我没有任何图形界面...不用pacman我怎么知道那些包关联啊?
还有哪个tsocks pacman怎么用
回复 支持 反对

使用道具 举报

发表于 2006-3-24 20:01:30 | 显示全部楼层
Post by njusz
问7楼,我现在是想安装kde,我没有任何图形界面...不用pacman我怎么知道那些包关联啊?
还有哪个tsocks pacman怎么用


你的代理是socks的吗?

  1. pacman -S tsocks
  2. man tsocks.conf
复制代码

好像你还不能下??

在pacman.conf中 添加(设你代理的IP为xx.xx.xx.xx:xx,用户名为user ,密码为password)

  1. XferCommand = /usr/bin/wget --proxy-user=user --proxy-password=password -c
  2. ProxyServer=xx.xx.xx.xx:xx
复制代码

在shell中

  1. export  http_proxy=xx.xx.xx.xx:xx
复制代码

然后pacman -Syu 看行不,不行的话
把ProxyServer=xx.xx.xx.xx:xx注释掉试试看
回复 支持 反对

使用道具 举报

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

本版积分规则

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