升级 ubuntu21 失败,后面怎么办?

2021-08-02 20:43:14 +08:00
 PbCopy111

我有一个 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 。

2994 次点击
所在节点    Ubuntu
11 条回复
learningman
2021-08-02 20:49:52 +08:00
控制台找找 vnc,或者有没有 rescue image
PbCopy111
2021-08-02 20:51:24 +08:00
@learningman ???这是什么?我现在可以进系统了啊,只不过我没有安装 xwin,所以没有桌面。
YsHaNg
2021-08-02 20:51:55 +08:00
sudo apt-get install <list of packages kept back>
PigKnife
2021-08-02 21:58:37 +08:00
换 Arch ?
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)'"}')
PbCopy111
2021-08-02 23:10:55 +08:00
我觉得没法升级的原因,就是系统升级到一半不知道为什么就挂了,导致这些软件卡在中间,有的太新了。
比如没法升级的第一个软件:

```
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.
```
PbCopy111
2021-08-02 23:12:09 +08:00
@PigKnife 这不重新安装一个意思么。。。。我就是懒得重新安装,需要配置的太多了。。。
PbCopy111
2021-08-02 23:13:33 +08:00
对了,我还执行过了 apt -f install 然后 apt autoremove 了,故障依旧,没什么可修复的。。
是不是还是跟内核有关系啊?
sagaxu
2021-08-02 23:24:29 +08:00
有没有加过 ppa? 有没有多个 apt mirror 混用?
wi857nston
2021-08-03 00:00:25 +08:00
光说没用 自己搞不定 要么重装 要么花钱找人搞 150 一次 有需要可以找我
jim9606
2021-08-03 00:12:39 +08:00
apt-mark show hold 检查一下软件包是不是被锁版本了。
你这里好像是 nginx 和 mariadb 升级不了,如果你没在用可以暂时卸载掉,或者升级完重新安装。
do-release-upgrade 前建议运行 sudo apt autoremove 删掉无用的依赖,能少点冲突。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/793238

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX