arch linux可以上网吗,archlinux无法联网解决方法

今晚准备在vmware虚拟机上试着装一个archlinux来玩。

根据wiki上面的教程一步一步做下来,只漏掉了网络配置这一个环节。

结果配置完重启archlinux,发现ping www.baidu.com等等的网站皆显示unknown host.

在执行pacman -Syu或者pacman -Syy的时候,提示

[greglee@myhost ~]$ sudo pacman -Syu

:: Synchronizing package databases...

error: failed retrieving file 'core.db' from archlinux.mirrors.ovh.net : Could not resolve host: archlinux.mirrors.ovh.net; Name or service not known

error: failed retrieving file 'core.db' from archlinux.mirror.kangaroot.net : Could not resolve host: archlinux.mirror.kangaroot.net; Name or service not known

error: failed retrieving file 'core.db' from mir.archlinux.fr : Could not resolve host: mir.archlinux.fr; Name or service not known

error: failed retrieving file 'core.db' from ftp.nluug.nl : Could not resolve host: ftp.nluug.nl; Name or service not known

error: failed retrieving file 'core.db' from archlinux.mirror.root.lu : Could not resolve host: archlinux.mirror.root.lu; Name or service not known

error: failed retrieving file 'core.db' from mirror.nl.leaseweb.net : Could not resolve host: mirror.nl.leaseweb.net; Name or service not known

error: failed retrieving file 'core.db' from ftp.halifax.rwth-aachen.de : Could not resolve host: ftp.halifax.rwth-aachen.de; Name or service not known

error: failed retrieving file 'core.db' from mirror.de.leaseweb.net : Could not resolve host: mirror.de.leaseweb.net; Name or service not known

error: failed retrieving file 'core.db' from ftp.uni-kl.de : Could not resolve host: ftp.uni-kl.de; Name or service not known

error: failed retrieving file 'core.db' from archlinux.limun.org : Could not resolve host: archlinux.limun.org; Name or service not known

error: failed to update core (download library error)

error: failed retrieving file 'extra.db' from archlinux.mirrors.ovh.net : Could not resolve host: archlinux.mirrors.ovh.net; Name or service not known

error: failed retrieving file 'extra.db' from archlinux.mirror.kangaroot.net : Could not resolve host: archlinux.mirror.kangaroot.net; Name or service not known

error: failed retrieving file 'extra.db' from mir.archlinux.fr : Could not resolve host: mir.archlinux.fr; Name or service not known

error: failed retrieving file 'extra.db' from ftp.nluug.nl : Could not resolve host: ftp.nluug.nl; Name or service not known

error: failed retrieving file 'extra.db' from archlinux.mirror.root.lu : Could not resolve host: archlinux.mirror.root.lu; Name or service not known

error: failed retrieving file 'extra.db' from mirror.nl.leaseweb.net : Could not resolve host: mirror.nl.leaseweb.net; Name or service not known

error: failed retrieving file 'extra.db' from ftp.halifax.rwth-aachen.de : Could not resolve host: ftp.halifax.rwth-aachen.de; Name or service not known

error: failed retrieving file 'extra.db' from mirror.de.leaseweb.net : Could not resolve host: mirror.de.leaseweb.net; Name or service not known

error: failed retrieving file 'extra.db' from ftp.uni-kl.de : Could not resolve host: ftp.uni-kl.de; Name or service not known

error: failed retrieving file 'extra.db' from archlinux.limun.org : Could not resolve host: archlinux.limun.org; Name or service not known

error: failed to update extra (download library error)

error: failed retrieving file 'community.db' from archlinux.mirrors.ovh.net : Could not resolve host: archlinux.mirrors.ovh.net; Name or service not known

error: failed retrieving file 'community.db' from archlinux.mirror.kangaroot.net : Could not resolve host: archlinux.mirror.kangaroot.net; Name or service not known

error: failed retrieving file 'community.db' from mir.archlinux.fr : Could not resolve host: mir.archlinux.fr; Name or service not known

error: failed retrieving file 'community.db' from ftp.nluug.nl : Could not resolve host: ftp.nluug.nl; Name or service not known

error: failed retrieving file 'community.db' from archlinux.mirror.root.lu : Could not resolve host: archlinux.mirror.root.lu; Name or service not known

error: failed retrieving file 'community.db' from mirror.nl.leaseweb.net : Could not resolve host: mirror.nl.leaseweb.net; Name or service not known

error: failed retrieving file 'community.db' from ftp.halifax.rwth-aachen.de : Could not resolve host: ftp.halifax.rwth-aachen.de; Name or service not known

error: failed retrieving file 'community.db' from mirror.de.leaseweb.net : Could not resolve host: mirror.de.leaseweb.net; Name or service not known

error: failed retrieving file 'community.db' from ftp.uni-kl.de : Could not resolve host: ftp.uni-kl.de; Name or service not known

error: failed retrieving file 'community.db' from archlinux.limun.org : Could not resolve host: archlinux.limun.org; Name or service not known

error: failed to update community (download library error)

error: failed to synchronize any databases

error: failed to init transaction (download library error) 这个问题让我困扰了很久,在网上找了很多的资料,wiki上面的官方解释是ipv6没有禁用,又或者是源不可用,但是经过我的测试,发现其实是网络根本就没有连通导致的。

最终,终于被我找到了一个解决方案。应该是网络没有自动获取IP.

所以,我的解决方法是,

>nano /etc/rc.conf

在这个文件中添加:

>interface = eth0

保存退出之后,敲入命令

>dhcpcd

马上发现一切正常工作了!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值