Ubuntu升级之后打算安装几个新的软件:
sudo apt-get install gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal返回错误类似如下:
E: Failed to fetch http://hk.archive.ubuntu.com/ubuntu/pool/universe/x/xfce4-appfinder/xfce4-appfinder_4.10.1-1_amd64.deb Could not resolve 'hk.archive.ubuntu.com'
E: Failed to fetch http://hk.archive.ubuntu.com/ubuntu/pool/universe/x/xfce4-mixer/xfce4-mixer_4.10.0-1ubuntu2_amd64.deb Could not resolve 'hk.archive.ubuntu.com'这个是网络解析过程出错导致的。ping内网机器可以,但是外网机器ping不通。
irdetogame@CMGC-5:~$ ping cn.archive.ubuntu.com
ping: unknown host cn.archive.ubuntu.com然后尝试设置默认网关。
irdetogame@CMGC-5:/etc$ sudo route add default gw 192.168.1.1
[sudo] password for irdetogame:
SIOCADDRT: Network is unreachable
提示 network is unreachable。原来服务器升级之后,DNS配置不见了,于是重新配置DNS。
vi /etc/resolv.conf
nameserver <DNS server ip>然后重启网络配置。
/etc/init.d/networking restart再次运行apt-get安装就成功了。
在完成Ubuntu 12.04到14.04的系统升级后,尝试使用apt-get安装软件时遇到问题。本文详细记录了解决此问题的步骤,包括更新软件源、清理旧缓存和修复依赖等关键操作,最终成功完成软件安装。
3万+

被折叠的 条评论
为什么被折叠?



