如参考资料所写,就是不要随便修改/etc/apt/sources.list
笔者自己也遇到过(好像是系统更新完了源没换),这次是帮人修复电脑问题(至少2个人遇到过这个问题),他好不容易折腾到能起界面
一看终端
1498个软件包未被升级就知道怎么回事了
看看 /etc/apt/sources.list
##阿里源
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
##163源
# deb http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
# deb http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
# deb http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
# deb http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
# deb http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
# deb-src http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
# deb-src http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
# deb-src http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
# deb-src http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse
##清华源
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
##中科大源
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
看上去没啥问题啊?
再看看原来的备份
# deb cdrom:[Ubuntu 16.04.5 LTS _Xenial Xerus_ - Release amd64 (20180731)]/ xenial main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://cn.archive.ubuntu.com/ubuntu/ xenial universe
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial universe
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates universe
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://cn.archive.ubuntu.com/ubuntu/ xenial multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu xenial partner
# deb-src http://archive.canonical.com/ubuntu xenial partner
对, 系统是16.04(xenial xerus)的 而非18.04(bionic beaver)的
ubuntu的软件仓库有版本概念, 如果16.04的系统用了18.04的仓库 软件能起来是幸运, 但是就会有一堆报错了
但是多数百度的资料没讲这点; 参考资料1有讲到
多数人没修改源,用的默认的, 这个服务器是 cn.archive.ubuntu.org.cn, 以前有段时间是指向阿里云好像, ping过去
sudo busybox ping cn.archive.ubuntu.com
PING cn.archive.ubuntu.com (45.125.0.6): 56 data bytes
64 bytes from 45.125.0.6: seq=0 ttl=47 time=266.571 ms
64 bytes from 45.125.0.6: seq=1 ttl=47 time=265.568 ms
64 bytes from 45.125.0.6: seq=2 ttl=47 time=257.845 ms
64 bytes from 45.125.0.6: seq=5 ttl=47 time=253.261 ms
64 bytes from 45.125.0.6: seq=7 ttl=47 time=259.055 ms
确实要换源, 网络太差.那怎么改呢?
首先,
不要信百度,
不要信bing,
不要信百度!
一般讲不清楚, 像资料1里讲清楚的你也不一定看清楚.不懂内部原理都是瞎猫碰死耗子.
其次, 打开软件和更新:
点击选项, 其他:
选择最佳服务器,系统会自动帮你选
我选的是腾讯,也可以是ustc(中科大),别的都行
注: 有发现选择服务器后在上面的菜单里还是选"中国的服务器", 这个情况不知道啥问题, 我是再点进列表再选择一次刚才选中的服务器.
选完了点选择服务器, 关闭菜单,会提示你更新软件仓库
在这里重新载入也可以, 点关闭的话,需要自己在终端执行sudo apt update更新
更新仓库后才能安装软件哦! 所以推荐在这里重新载入以免忘记.
更新后, 1498的软件未被升级的提示就会减少了
如果需要直接修改sources.list, 确保你知道你在干什么, 并且在修改前备份文件
然后要搜索和你电脑同版本的软件源更新, 或者直接搜索如"Ubuntu 20.04 source.list"找这个文件的默认内容
注: 也有发现"软件和更新"选择的服务器, 选择了所有的更新内容后, 在sources.list里面只看到了如 focal main universe multiverse restricted的服务器
focal-updates的main universe multiverse restricted的服务器, 还有focal-security的main universe multiverse restricted的服务器这些都没加上, focal-backports的就不确定要不要了
在意的话可以找一个默认文件把上面这几种补上
aptitude 版本分析的方法, 简单的就是看它给的方案:
参与评论
手机查看
返回顶部