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,行为金融学与传统金融学的碰撞,"['金融学', '行为经济学', '投资策略', '市场异象', '心理偏差']

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

       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


 

       

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值