LinuxSir.cn,穿越时空的Linuxsir!

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

emerge 安装一个包时,wget提示解析地址错误,但是能用wget直接下载,郁闷...

[复制链接]
发表于 2010-10-17 23:37:02 | 显示全部楼层 |阅读模式
localhost ~ # emerge iputils

* IMPORTANT: 2 news items need reading for repository 'gentoo'.
* Use eselect news to read news items.

Calculating dependencies... done!

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) net-misc/iputils-20100418
>>> Downloading 'http://distfiles.gentoo.org/distfiles/iputils-s20100418.tar.bz2'
--2010-10-16 00:15:36--  http://distfiles.gentoo.org/distfiles/iputils-s20100418.tar.bz2
Resolving distfiles.gentoo.org... failed: Name or service not known.
wget: unable to resolve host address `distfiles.gentoo.org' // 这里下载失败,提示解析地址错误??
>>> Downloading 'http://www.skbuff.net/iputils/iputils-s20100418.tar.bz2'
--2010-10-16 00:15:36--  http://www.skbuff.net/iputils/iputils-s20100418.tar.bz2
Resolving www.skbuff.net... failed: Name or service not known.
wget: unable to resolve host address `www.skbuff.net'
!!! Couldn't download 'iputils-s20100418.tar.bz2'. Aborting.
* Fetch failed for 'net-misc/iputils-20100418', Log file:
*  '/var/tmp/portage/net-misc/iputils-20100418/temp/build.log'

>>> Failed to emerge net-misc/iputils-20100418, Log file:

>>>  '/var/tmp/portage/net-misc/iputils-20100418/temp/build.log'

* Messages for package net-misc/iputils-20100418:

* Fetch failed for 'net-misc/iputils-20100418', Log file:
*  '/var/tmp/portage/net-misc/iputils-20100418/temp/build.log'

* IMPORTANT: 2 news items need reading for repository 'gentoo'.
* Use eselect news to read news items.

// 尝试用wget直接下载,提示下载成功??
localhost ~ # wget http://distfiles.gentoo.org/distfiles/iputils-s20100418.tar.bz2
--2010-10-16 00:15:57--  http://distfiles.gentoo.org/distfiles/iputils-s20100418.tar.bz2
Resolving distfiles.gentoo.org... 64.50.236.52, 204.152.191.39, 199.6.1.174, ...
Connecting to distfiles.gentoo.org|64.50.236.52|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 94237 (92K) [application/x-tar]
Saving to: `iputils-s20100418.tar.bz2'

100%[======================================>] 94,237      43.9K/s   in 2.1s   

2010-10-16 00:16:00 (43.9 KB/s) - `iputils-s20100418.tar.bz2' saved [94237/94237]
localhost / #
localhost / #
localhost / #
emerge的时候DNS解析不正确,这个如何解决?
 楼主| 发表于 2010-10-18 10:10:09 | 显示全部楼层
在一台电脑上 chroot 这个文件系统,可以正常安装软件,按这个道理用的是相同wget程序,莫非系统上有细微差异,求解?
回复 支持 反对

使用道具 举报

发表于 2010-10-18 10:35:06 | 显示全部楼层
不行把那个写到 hosts 文件里面看看
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-10-18 10:37:19 | 显示全部楼层
贴上hosts内容,还是原版没有动过

localhost ~ # cat /etc/hosts
# /etc/hosts: Local Host Database
#
# This file describes a number of aliases-to-address mappings for the for
# local hosts that share this file.
#
# In the presence of the domain name service or NIS, this file may not be
# consulted at all; see /etc/host.conf for the resolution order.
#

# IPv4 and IPv6 localhost aliases
127.0.0.1       localhost
::1             localhost

#
# Imaginary network.
#10.0.0.2               myname
#10.0.0.3               myfriend
#
# According to RFC 1918, you can use the following IP networks for private
# nets which will never be connected to the Internet:
#
#       10.0.0.0        -   10.255.255.255
#       172.16.0.0      -   172.31.255.255
#       192.168.0.0     -   192.168.255.255
#
# In case you want to be able to connect directly to the Internet (i.e. not
# behind a NAT, ADSL router, etc...), you need real official assigned
# numbers.  Do not try to invent your own network numbers but instead get one
# from your network provider (if any) or from your regional registry (ARIN,
# APNIC, LACNIC, RIPE NCC, or AfriNIC.)
#
回复 支持 反对

使用道具 举报

发表于 2010-10-18 10:40:01 | 显示全部楼层
忘记 copy /etc/resolv.conf 到 chroot 里面了?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-10-18 10:49:39 | 显示全部楼层
单独用ping 或者wget 能解析dns域名的

localhost ~ # cat /etc/resolv.conf

# Generated by dhcpcd from eth0
# /etc/resolv.conf.head can replace this line
nameserver 202.96.134.33
nameserver 202.96.128.86
# /etc/resolv.conf.tail can replace this line

localhost ~ # ping www.google.com
PING www-g-com-chn.l.google.com (66.249.89.104) 56(84) bytes of data.
64 bytes from nrt04s01-in-f104.1e100.net (66.249.89.104): icmp_req=1 ttl=48 time=70.8 ms
64 bytes from nrt04s01-in-f104.1e100.net (66.249.89.104): icmp_req=2 ttl=48 time=70.9 ms
64 bytes from nrt04s01-in-f104.1e100.net (66.249.89.104): icmp_req=3 ttl=48 time=81.4 ms
64 bytes from nrt04s01-in-f104.1e100.net (66.249.89.104): icmp_req=4 ttl=48 time=71.2 ms
64 bytes from nrt04s01-in-f104.1e100.net (66.249.89.104): icmp_req=5 ttl=48 time=71.8 ms
^C
--- www-g-com-chn.l.google.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4004ms
rtt min/avg/max/mdev = 70.832/73.262/81.490/4.128 ms
localhost ~ #
localhost ~ #
回复 支持 反对

使用道具 举报

发表于 2010-10-18 14:49:23 | 显示全部楼层
改下make.conf吧。
distfiles.gentoo.org 是转入镜像网站的,像163这样的镜像。
回复 支持 反对

使用道具 举报

发表于 2010-10-22 09:38:34 | 显示全部楼层
是不是在make.conf设置了proxy?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-10-22 22:26:33 | 显示全部楼层
Post by jame298;2116762
是不是在make.conf设置了proxy?


没有设置**,我在gentoo主论坛看到也是相同的问题:
http://forums.gentoo.org/viewtopic-t-847163.html
回复 支持 反对

使用道具 举报

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

本版积分规则

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