您尚未登录。

#1 2016-08-06 12:42:28

whystic
会员
注册时间: 2016-07-27
帖子: 8

[已解决]有线网络下无法更新和安装软件

使用的是有线网络,能够正常上网,但是在使用 pacman -Syu 和安装软件的时候总是提示 error: failed retrieving file from ...
mirrors是 ustc 和 163 的,也能 ping 通,另外,无论是设置默认的还是自定义的 dns 都没有效果.
但是在使用 wifi 连接的时候就可以正常的更新以及安装软件.
请问这是什么原因呢?如何解决?

最近编辑记录 whystic (2016-08-08 12:19:42)

离线

#2 2016-08-06 14:46:26

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,478
个人网站

Re: [已解决]有线网络下无法更新和安装软件

不知道。

你写的报错信息里没有最重要的部分。能够正常上网的话,上 https://mirrors.ustc.edu.cn/archlinuxcn/x86_64/ 下个包试试?

离线

#3 2016-08-06 17:48:30

whystic
会员
注册时间: 2016-07-27
帖子: 8

Re: [已解决]有线网络下无法更新和安装软件

依云 说:

不知道。

你写的报错信息里没有最重要的部分。能够正常上网的话,上 https://mirrors.ustc.edu.cn/archlinuxcn/x86_64/ 下个包试试?

pacman -Syu 报错如下

error: failed retrieving file 'core.db' from mirrors.ustc.edu.cn : Resolving timed out after 10519 milliseconds
error: failed retrieving file 'core.db' from mirrors.163.com : Resolving timed out after 10518 milliseconds
error: failed to update core (download library error)
error: failed retrieving file 'extra.db' from mirrors.ustc.edu.cn : Resolving timed out after 10520 milliseconds
error: failed retrieving file 'extra.db' from mirrors.163.com : Resolving timed out after 10518 milliseconds
error: failed to update extra (download library error)
error: failed retrieving file 'community.db' from mirrors.ustc.edu.cn : Resolving timed out after 10519 milliseconds
error: failed retrieving file 'community.db' from mirrors.163.com : Resolving timed out after 10519 milliseconds
error: failed to update community (download library error)
error: failed retrieving file 'multilib.db' from mirrors.ustc.edu.cn : Resolving timed out after 10519 milliseconds
error: failed retrieving file 'multilib.db' from mirrors.163.com : Resolving timed out after 10519 milliseconds
error: failed to update multilib (download library error)

另外,无法使用使用 curl 下载 mirrors.ustc.edu.cn  显示

Could not resolve host:

dns 用的是 dnspod 和 114的.
不知道是不是 curl 的问题, 电脑上面没有 wget.
之前电脑装的是 ubuntu 更新的时候没有出现过这种问题

最近编辑记录 whystic (2016-08-06 17:55:43)

离线

#4 2016-08-06 19:50:37

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,478
个人网站

Re: [已解决]有线网络下无法更新和安装软件

域名解析失败。 cat /etc/resolv.conf 看看。

离线

#5 2016-08-06 20:43:07

whystic
会员
注册时间: 2016-07-27
帖子: 8

Re: [已解决]有线网络下无法更新和安装软件

依云 说:

域名解析失败。 cat /etc/resolv.conf 看看。

现在在家用的是 wifi 所以更新没问题, 在用 wifi 的情况下不论是自动获取 dns 还是手动设定都没问题, 但是在使用有线的情况下, 这两种办法都没有用, 设置成静态IP也不行, 只能上网, 不能更新.

离线

#6 2016-08-06 22:54:03

wxg4net
会员
注册时间: 2012-01-07
帖子: 274

Re: [已解决]有线网络下无法更新和安装软件

whystic 说:
依云 说:

域名解析失败。 cat /etc/resolv.conf 看看。

现在在家用的是 wifi 所以更新没问题, 在用 wifi 的情况下不论是自动获取 dns 还是手动设定都没问题, 但是在使用有线的情况下, 这两种办法都没有用, 设置成静态IP也不行, 只能上网, 不能更新.

域名解析失败。 cat /etc/resolv.conf 看看。


Arch Linux User

离线

#7 2016-08-06 23:20:08

whystic
会员
注册时间: 2016-07-27
帖子: 8

Re: [已解决]有线网络下无法更新和安装软件

wxg4net 说:
whystic 说:
依云 说:

域名解析失败。 cat /etc/resolv.conf 看看。

现在在家用的是 wifi 所以更新没问题, 在用 wifi 的情况下不论是自动获取 dns 还是手动设定都没问题, 但是在使用有线的情况下, 这两种办法都没有用, 设置成静态IP也不行, 只能上网, 不能更新.

域名解析失败。 cat /etc/resolv.conf 看看。

# Generated by resolvconf
nameserver 119.29.29.29
nameserver 114.114.114.114

离线

#8 2016-08-07 07:27:48

wxg4net
会员
注册时间: 2012-01-07
帖子: 274

Re: [已解决]有线网络下无法更新和安装软件

whystic 说:
wxg4net 说:
whystic 说:
依云 说:

域名解析失败。 cat /etc/resolv.conf 看看。

现在在家用的是 wifi 所以更新没问题, 在用 wifi 的情况下不论是自动获取 dns 还是手动设定都没问题, 但是在使用有线的情况下, 这两种办法都没有用, 设置成静态IP也不行, 只能上网, 不能更新.

域名解析失败。 cat /etc/resolv.conf 看看。

# Generated by resolvconf
nameserver 119.29.29.29
nameserver 114.114.114.114

这个是在有线状态下的配置么?


Arch Linux User

离线

#9 2016-08-07 11:21:47

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,478
个人网站

Re: [已解决]有线网络下无法更新和安装软件

那就 ping 119.29.29.29。
真不知道你是怎么「能够正常上网」的。

离线

#10 2016-08-07 11:40:28

whystic
会员
注册时间: 2016-07-27
帖子: 8

Re: [已解决]有线网络下无法更新和安装软件

wxg4net 说:
whystic 说:
wxg4net 说:
whystic 说:
依云 说:

域名解析失败。 cat /etc/resolv.conf 看看。

现在在家用的是 wifi 所以更新没问题, 在用 wifi 的情况下不论是自动获取 dns 还是手动设定都没问题, 但是在使用有线的情况下, 这两种办法都没有用, 设置成静态IP也不行, 只能上网, 不能更新.

域名解析失败。 cat /etc/resolv.conf 看看。

# Generated by resolvconf
nameserver 119.29.29.29
nameserver 114.114.114.114

这个是在有线状态下的配置么?

不是, 用的是 wifi 不过在有线网的情况下也用的是这两个 dns 解析, 所以不知道问题出在哪里

离线

#11 2016-08-07 11:41:54

whystic
会员
注册时间: 2016-07-27
帖子: 8

Re: [已解决]有线网络下无法更新和安装软件

依云 说:

那就 ping 119.29.29.29。
真不知道你是怎么「能够正常上网」的。

在有线和无线网络下都可以 ping 通, 能够浏览网页, 但是在有线网络下不能更新.

离线

#12 2016-08-07 19:41:52

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,478
个人网站

Re: [已解决]有线网络下无法更新和安装软件

有线时:

dig @119.29.29.29 www.baidu.com
ping www.baidu.com
env | grep -i proxy

火狐安装 Firebug,浏览网页,按 F12 打开 Firebug 界面,切换到「网络」面板,刷新,查看远程 IP 那一列。

离线

#13 2016-08-08 09:07:25

whystic
会员
注册时间: 2016-07-27
帖子: 8

Re: [已解决]有线网络下无法更新和安装软件

依云 说:

有线时:

dig @119.29.29.29 www.baidu.com
ping www.baidu.com
env | grep -i proxy

火狐安装 Firebug,浏览网页,按 F12 打开 Firebug 界面,切换到「网络」面板,刷新,查看远程 IP 那一列。

dig @119.29.29.29 www.baidu.com 时:

; <<>> DiG 9.10.4-P2 <<>> @119.29.29.29 www.baidu.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 11005
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;www.baidu.com.			IN	A

;; ANSWER SECTION:
www.baidu.com.		1046	IN	CNAME	www.a.shifen.com.
www.a.shifen.com.	146	IN	A	14.215.177.38
www.a.shifen.com.	146	IN	A	14.215.177.37

;; Query time: 10 msec
;; SERVER: 119.29.29.29#53(119.29.29.29)
;; WHEN: Mon Aug 08 08:43:27 CST 2016
;; MSG SIZE  rcvd: 101

ping www.baidu.com 时:

PING www.a.shifen.com (14.215.177.38) 56(84) bytes of data.
64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=3 ttl=55 time=11.0 ms
64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=4 ttl=55 time=13.7 ms
64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=5 ttl=55 time=11.1 ms
64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=6 ttl=55 time=6.59 ms
64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=8 ttl=55 time=10.7 ms
64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=9 ttl=55 time=9.63 ms
64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=10 ttl=55 time=8.40 ms
64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=11 ttl=55 time=12.3 ms
64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=12 ttl=55 time=9.20 ms
64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=14 ttl=55 time=13.1 ms
^C
--- www.a.shifen.com ping statistics ---
14 packets transmitted, 10 received, 28% packet loss, time 13031ms
rtt min/avg/max/mdev = 6.592/10.607/13.720/2.093 ms

env | grep -i proxy 时: 没有输出

www.baidu.com 的远程IP: 14.215.177.38:443

cat /etc/resolv.conf 时:

# Generated by resolvconf
nameserver 119.29.29.29
nameserver 114.114.114.114

试了一下从 https://mirrors.ustc.edu.cn/archlinuxcn/x86_64/ 下包

wget https://mirrors.ustc.edu.cn/archlinuxcn/x86_64/abootimg-git-0.6.r6.g1ebeb39-1-x86_64.pkg.tar.xz
--2016-08-08 09:10:13--  https://mirrors.ustc.edu.cn/archlinuxcn/x86_64/abootimg-git-0.6.r6.g1ebeb39-1-x86_64.pkg.tar.xz
Resolving mirrors.ustc.edu.cn (mirrors.ustc.edu.cn)... 202.141.160.110, 2001:da8:d800:95::110
Connecting to mirrors.ustc.edu.cn (mirrors.ustc.edu.cn)|202.141.160.110|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 10740 (10K) [application/octet-stream]
Saving to: ‘abootimg-git-0.6.r6.g1ebeb39-1-x86_64.pkg.tar.xz’

abootimg-git-0.6.r6 100%[===================>]  10.49K  --.-KB/s    in 0s      

2016-08-08 09:10:23 (100 MB/s) - ‘abootimg-git-0.6.r6.g1ebeb39-1-x86_64.pkg.tar.xz’ saved [10740/10740]

最近编辑记录 whystic (2016-08-08 09:12:50)

离线

#14 2016-08-08 11:20:38

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,478
个人网站

Re: [已解决]有线网络下无法更新和安装软件

所以一切正常啊。

离线

#15 2016-08-08 12:16:17

whystic
会员
注册时间: 2016-07-27
帖子: 8

Re: [已解决]有线网络下无法更新和安装软件

依云 说:

所以一切正常啊。

可能是因为网络不稳定的原因吧, 今天试了一下, 虽然说大部分情况下无法更新,但是多试几遍总可以有一次可以使用, 所以暂时只能这样吧, 还有谢谢你耐心的指导, 非常感谢

离线

页脚