ubuntu 三者互ping成功,但连不上网,换了各种源都无法解决,一直Could not resolve ‘mirrors.aliyun.com’。已解决!#linux ping不通外网

        sudo apt-get install 一直失败!sudo apt-get update 一直失败!全是Could not resolve ‘mirrors.aliyun.com’

        连不上外网 ping news.qq.com失败  Name or service not konwn 

        ping 一些网址 还会出现 Destination Host Unreachable的问题

        试了网上各种方法:换源、修改/etc/resolv.conf、修改sources.list、解压新的镜像等等等等

        最终还是求助了百问网的技术顾问 试了很多方法也没成功 最终todesk 远程操作 几分钟就解决了

        怀疑是网络环境被不知道怎么的修改坏了 

解决办法:关闭虚拟机,在VM上打开虚拟网络编辑,还原默认设置,结束后记得把桥接网络选回自己之前的网络选项。再次打开ubuntu,就能ping通外网了。

ping news.qq.com成功

sudo apt-get update成功

        最后附一张工程师尝试的一些方法简记,这个问题困扰了我一两天,解决的那一瞬间超级开心,工程师不愧是工程师,我一定要记录下来,所以这是我第一次发博客,希望能帮助到遇到同样问题的小伙伴们。

vmuser@ubuntu:~$ sudo apt-get install device-tree-compiler Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: clang fcitx fcitx-bin fcitx-config-common fcitx-config-gtk fcitx-data fcitx-frontend-all fcitx-frontend-gtk2 fcitx-frontend-gtk3 fcitx-frontend-qt5 fcitx-module-dbus fcitx-module-kimpanel fcitx-module-lua fcitx-module-x11 fcitx-modules fcitx-ui-classic libbotan-2-4 libegl1-mesa-dev libfcitx-config4 libfcitx-core0 libfcitx-gclient1 libfcitx-qt5-1 libfcitx-utils0 libgettextpo0 libgles2-mesa-dev libglu1-mesa-dev liblua5.2-0 libopencc2 libopencc2-data libpresage-data libpresage1v5 libqbscore1.10 libqbsqtprofilesetup1.10 libqt4-qt3support libqt5concurrent5 libqt5designer5 libqt5designercomponents5 libqt5help5 libqt5opengl5 libqt5quicktest5 libqt5quickwidgets5 libqt5script5 libqt5sql5 libqt5sql5-sqlite libqt5test5 libqt5xml5 libqt5xmlpatterns5 libqtwebkit4 libtinyxml2.6.2v5 libtspi1 libwayland-bin libwayland-dev presage qbs-common qml-module-qtgraphicaleffects qml-module-qtqml-models2 qml-module-qtquick-controls qml-module-qtquick-layouts qml-module-qtquick-window2 qml-module-qtquick2 qtcreator-data qtcreator-doc Use 'sudo apt autoremove' to remove them. The following NEW packages will be installed: device-tree-compiler 0 upgraded, 1 newly installed, 0 to remove and 301 not upgraded. Need to get 239 kB of archives. After this operation, 441 kB of additional disk space will be used. Err:1 http://mirrors.aliyun.com/ubuntu bionic/main amd64 device-tree-compiler amd64 1.4.5-3 Could not resolve 'mirrors.aliyun.com' E: Failed to fetch http://mirrors.aliyun.com/ubuntu/pool/main/d/device-tree-compiler/device-tree-compiler_1.4.5-3_amd64.deb Could not resolve 'mirrors.aliyun.com' E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
11-10
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值