当前位置:首页文章笔记服务运维Ubuntu18.04更新源为阿里云导致无法更新软件的问题

Ubuntu18.04更新源为阿里云导致无法更新软件的问题

在上一篇安装Ubuntu18.04的文章中,无言把默认官方更新源修改成了阿里云的源。这给无言埋下了个大坑。

在Ubuntu18.04安装完成后,无言就想更新和安装一些常用工具软件的,但是不管是更新还是安装都显示下面错误

root@roott:~# apt install ifupdown
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  ppp rdnssd
The following NEW packages will be installed:
  ifupdown
0 upgraded, 1 newly installed, 0 to remove and 33 not upgraded.
Need to get 55.9 kB of archives.
After this operation, 227 kB of additional disk space will be used.
Err:1 http://mirrors.aliyun.com/ubuntu bionic-updates/main amd64 ifupdown amd64 0.8.17ubuntu1.1
  Temporary failure resolving 'mirrors.aliyun.com'
E: Failed to fetch http://mirrors.aliyun.com/ubuntu/pool/main/i/ifupdown/ifupdown_0.8.17ubuntu1.1_amd64.deb  Temporary failure resolving 'mirrors.aliyun.com'
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

zASDASDASDA

这个错误就有点莫名其妙,无言想了半天也没整明白哪里出问题了。

查找问题的过程和百度找相关问题的解决方案就花了个把小时,终于在大量的垃圾文章中找到了解决方案。

解决方案是来着https://blog.csdn.net/weixin_46223196/article/details/113005023这篇文章中的第三个方法。

在 /etc/resolv.conf文件中加入阿里云的DNS后,终于可以更新和安装软件了

roott@roott:~$ vi /etc/resolv.conf
nameserver 223.5.5.5
nameserver 223.6.6.6

温馨提示:

文章标题:Ubuntu18.04更新源为阿里云导致无法更新软件的问题

文章链接:https://www.wuyanshuo.cn/5375.html

更新时间:2023年04月08日

本站大部分内容均收集于网络!若内容若侵犯到您的权益,请发送邮件至:service@wuyanshuo.cn我们将第一时间处理! 资源所需价格并非资源售卖价格,是收集、整理、编辑详情以及本站运营的适当补贴,并且本站不提供任何免费技术支持。 所有资源仅限于参考和学习,版权归原作者所有,更多请阅读无言说网络服务协议

给TA打赏
共{{data.count}}人
人已打赏
服务运维

系统安装教程之Ubuntu18.04最小化安装

2023-4-8 21:07:48

服务运维

Ubuntu重启网卡的三种方法

2023-4-8 21:48:12

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索
'