我有一个 vps,ubuntu20.04 版本,打算升级到 21. 可是执行升级命令的时候报错,结果现在陷入了死循环,具体如下:
sudo do-release-upgrade
Checking for a new Ubuntu release
Please install all available updates for your release before upgrading.
sudo apt update
59 packages can be upgraded. Run 'apt list --upgradable' to see them.
sudo apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
bind9-dnsutils bind9-host libmagickwand-6.q16-6 libnginx-mod-http-image-filter libnginx-mod-http-xslt-filter libnginx-mod-mail libnss-systemd
libpython2.7-minimal libqca-qt5-2 libqt5dbus5 libqt5sql5-sqlite linux-headers-generic mariadb-client mariadb-server nginx nginx-common
quassel-core systemd-sysv
0 upgraded, 0 newly installed, 0 to remove and 18 not upgraded.
如果运行 sudo apt dist-upgrade,跟上面的提示是一样的,18 not upgraded
之前还曾经无法进入系统,等了一天突然可以选择进入哪个内核了,选择进入原来的内核,现在还可以操作。 是不是除了重装,没什么办法了??还有,vps 如何选择进入修复程序??没有键盘可以按啊。。。我用的 linnode 的 vps 。
1
learningman 2021-08-02 20:49:52 +08:00
控制台找找 vnc,或者有没有 rescue image
|
2
PbCopy111 OP @learningman ???这是什么?我现在可以进系统了啊,只不过我没有安装 xwin,所以没有桌面。
|
3
YsHaNg 2021-08-02 20:51:55 +08:00
sudo apt-get install <list of packages kept back>
|
4
PigKnife 2021-08-02 21:58:37 +08:00
换 Arch ?
|
5
vibbow 2021-08-02 22:41:38 +08:00
apt install -y apt-show-versions
sudo apt-get install $(apt-show-versions \ | grep -P 'newer than version in archive' \ | awk -F: '{print $1"/'$(lsb_release -cs)'"}') |
6
PbCopy111 OP 我觉得没法升级的原因,就是系统升级到一半不知道为什么就挂了,导致这些软件卡在中间,有的太新了。
比如没法升级的第一个软件: ``` sudo apt install bind9-dnsutils Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: bind9-dnsutils : Depends: bind9-libs (= 1:9.16.8-1ubuntu3.1) but 1:9.16.1-0ubuntu2.8 is to be installed E: Unable to correct problems, you have held broken packages. ``` |
8
PbCopy111 OP 对了,我还执行过了 apt -f install 然后 apt autoremove 了,故障依旧,没什么可修复的。。
是不是还是跟内核有关系啊? |
9
sagaxu 2021-08-02 23:24:29 +08:00
有没有加过 ppa? 有没有多个 apt mirror 混用?
|
10
wi857nston 2021-08-03 00:00:25 +08:00 via Android
光说没用 自己搞不定 要么重装 要么花钱找人搞 150 一次 有需要可以找我
|
11
jim9606 2021-08-03 00:12:39 +08:00
apt-mark show hold 检查一下软件包是不是被锁版本了。
你这里好像是 nginx 和 mariadb 升级不了,如果你没在用可以暂时卸载掉,或者升级完重新安装。 do-release-upgrade 前建议运行 sudo apt autoremove 删掉无用的依赖,能少点冲突。 |