ubuntu12.04升级到14.04,apt-get install失败的问题解决
2015-06-12 18:27
621 查看
Ubuntu升级之后打算安装几个新的软件:
返回错误类似如下:
这个是网络解析过程出错导致的。ping内网机器可以,但是外网机器ping不通。
然后尝试设置默认网关。
提示 network is unreachable。原来服务器升级之后,DNS配置不见了,于是重新配置DNS。
然后重启网络配置。
再次运行apt-get安装就成功了。
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安装就成功了。
相关文章推荐
- SpannableString与SpannableStringBuilder
- 删除grub引导的linux双系统
- 设置DAG共享见证服务器“拒绝访问”报错解决方法
- FaceBook/infer-bin目录下的文件说明
- CocoaPods 执行pod install很慢 没反应
- android 自定义progressbar 样式
- 浅谈正则表达式-PHP为例
- quick-cocos2dx在xcode下如何添加额外的文件夹
- spring中集成TimerTask执行定时任务 中配置文件的配置
- [BigData]关于Hadoop学习笔记第三天(PPT总结)(一)
- 阅读《构建之法》第10、11、12章
- quick-cocos2dx的windows版如何显示标题栏下方的菜单栏
- wordpress文本编辑器百度UEditor中无法正常显示换行
- Doubles
- Doubles 分类: POJ 2015-06-12 18:24 11人阅读 评论(0) 收藏
- tar文件的安装 基础
- [LeetCode]Invert Binary Tree
- 使用JMeter测试Web应用
- codeforces #549G Happy Line
- FaceBook/infer-安装说明