ubuntu apt-get update 失败解决方法
来源:互联网 发布:js获取今天年月日 编辑:程序博客网 时间:2024/05/18 08:21
修改dns:
1,重启生效:
sudo vi /etc/resolvconf/resolv.conf.d/base(这个文件默认是空的)
在里面插入:
nameserver 8.8.8.8
nameserver 8.8.4.4
如果有多个DNS就一行一个
修改好保存,然后执行
sudo resolvconf -u
再看/etc/resolv.conf,最下面就多了2行:
cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 8.8.8.8
nameserver 8.8.4.4
可以看到我们的设置已经加上了,然后再ping一个域名,当时就可以解析了,无需重启。
一 、系统重启后会失效
1.修改DNS vi /run/resolvconf/resolv.conf
#nameserver 192.168.1.1
nameserver 8.8.8.8
nameserver 202.96.134.33
2.重启网络
sudo /etc/init.d/networking restart 即可
阅读全文
0 0
- ubuntu sudo apt-get update 失败 解决方法
- ubuntu sudo apt-get update 失败 解决方法
- ubuntu sudo apt-get update 失败 解决方法
- ubuntu apt-get update 失败解决方法
- ubuntu apt-get update失败
- Ubuntu apt-get update失败
- ubuntu apt-get update失败
- Ubuntu apt-get update 失败
- Ubuntu apt-get update 失败
- kali apt-get update失败解决方法
- ubuntu apt-get update 失败解决。
- ubuntu apt-get update 失败解决。
- ubuntu apt-get update 失败 解决方案
- Ubuntu apt-get update install失败
- ubuntu 12.10 sudo apt-get update 失败
- 关于Ubuntu apt-get update 失败,问题解决
- ubuntu的apt-get update失败
- ubuntu sudo apt-get update 失败
- 黑客术语基础知识
- ASP.NET身份验证方式
- Windows下使用linux命令
- HTML5移动端通过touch事件判断手势方向及页面到达底部
- 安卓开发获取总方法数
- ubuntu apt-get update 失败解决方法
- 生成数据表的SQL 语句
- 本地Yum 仓库 iOS文件挂载
- HDU
- 使用K近邻分类器对鸢尾花数据进行类别预测
- Common(三)—— CMsg
- 网银项目记录
- 视频动作识别--Towards Good Practices for Very Deep Two-Stream ConvNets
- Solr6.6在Windows(Centos6)上的安装与配置 (一)