ubuntu12.04:/etc/resolv.conf isn't a symlink, not doing anything

在VirtualBox中安装Ubuntu12.04后,尝试固定IP地址时遇到网络配置问题,报错‘/etc/resolv.conf isn't a symlink, not doing anything’。解决方案包括按照官方文档操作:将/etc/resolv.conf文件复制到/run/resolvconf/,删除原有的resolv.conf文件,并创建到/run/resolvconf/resolv.conf的软链接。" 109230884,8460978,行为金融学与传统金融学的碰撞,"['金融学', '行为经济学', '投资策略', '市场异象', '心理偏差']

       1,问题描述:virtualbox 安装 ubuntu12.04,想固定ip地址,修改 /etc/network/interfaces文件

auto eth1
iface eth1 inet static
address 192.168.56.100
netmask 255.255.255.0
gateway 192.168.56.1

      重启网络时报错:/etc/init.d/networking restart

                                 resolvconf: Error: /etc/resolv.conf isn't a symlink, not doing anything

        2,解决办法,参考官方文档:https://help.ubuntu.com/12.04/serverguide/network-configuration.html#name-resolution

               1),把/etc/resolv.conf 文件拷贝到目录:/run/resolvconf/ 下
               2),删除/etc/resolv.conf

               3),建立软连接:ln -s ../run/resolvconf/resolv.conf  /etc/resolv.conf

       还可以删除(此方法没试过):       

apt-get remove resolvconf


 

       

buntu@ubuntu-VirtualBox:~$ sudo apt-get update 忽略:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu mantic InRelease 忽略:2 http://mirrors.tuna.tsinghua.edu.cn/ubuntu mantic-updates InRelease 忽略:3 http://mirrors.tuna.tsinghua.edu.cn/ubuntu mantic-backports InRelease 错误:4 http://mirrors.tuna.tsinghua.edu.cn/ubuntu mantic Release 404 Not Found [IP: 101.6.15.130 80] 错误:5 http://mirrors.tuna.tsinghua.edu.cn/ubuntu mantic-updates Release 404 Not Found [IP: 101.6.15.130 80] 错误:6 http://mirrors.tuna.tsinghua.edu.cn/ubuntu mantic-backports Release 404 Not Found [IP: 101.6.15.130 80] 忽略:7 http://security.ubuntu.com/ubuntu mantic-security InRelease 错误:8 http://security.ubuntu.com/ubuntu mantic-security Release 404 Not Found [IP: 185.125.190.83 80] 正在读取软件包列表... 完成 E: 仓库 “http://cn.archive.ubuntu.com/ubuntu mantic Release” 没有 Release 文件。 N: 无法安全地用该源进行更新,所以默认禁用该源。 N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。 E: 仓库 “http://cn.archive.ubuntu.com/ubuntu mantic-updates Release” 没有 Release 文件。 N: 无法安全地用该源进行更新,所以默认禁用该源。 N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。 E: 仓库 “http://cn.archive.ubuntu.com/ubuntu mantic-backports Release” 没有 Release 文件。 N: 无法安全地用该源进行更新,所以默认禁用该源。 N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。 E: 仓库 “http://security.ubuntu.com/ubuntu mantic-security Release” 不再含有 Release 文件。 N: 无法安全地用该源进行更新,所以默认禁用该源。 N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。 ubuntu@ubuntu-VirtualBox:~$ ubuntu@ubuntu-VirtualBox:~$ sudo apt-get update 忽略:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu mantic InRelease 忽略:2 http://mirrors.tuna.tsinghua.edu.cn/ubuntu mantic-updates InRelease 忽略:3 http://mirrors.tuna.tsinghua.edu.cn/ubuntu mantic-backports InRelease 错误:4 http://mirrors.tuna.tsinghua.edu.cn/ubuntu mantic Release 404 Not Found [IP: 101.6.15.130 80] 错误:5 http://mirrors.tuna.tsinghua.edu.cn/ubuntu mantic-updates Release 404 Not Found [IP: 101.6.15.130 80] 错误:6 http://mirrors.tuna.tsinghua.edu.cn/ubuntu mantic-backports Release 404 Not Found [IP: 101.6.15.130 80] 忽略:7 http://security.ubuntu.com/ubuntu mantic-security InRelease 错误:8 http://security.ubuntu.com/ubuntu mantic-security Release 404 Not Found [IP: 185.125.190.83 80] 正在读取软件包列表... 完成 E: 仓库 “http://cn.archive.ubuntu.com/ubuntu mantic Release” 没有 Release 文件。 N: 无法安全地用该源进行更新,所以默认禁用该源。 N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。 E: 仓库 “http://cn.archive.ubuntu.com/ubuntu mantic-updates Release” 没有 Release 文件。 N: 无法安全地用该源进行更新,所以默认禁用该源。 N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。 E: 仓库 “http://cn.archive.ubuntu.com/ubuntu mantic-backports Release” 没有 Release 文件。 ubuntu@ubuntu-VirtualBox:~$ ^[[2~ 库创建和用户配置方面的细节。ease” 不再含有 Rel
最新发布
11-04
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值