问题描述
所以这是我的故事……
前几天我正在升级到ubuntu,并且在升级过程中电源正好消失,所以现在当我尝试进行升级时,它一直在问我是否要进行部分升级。我听说这很糟糕,应该避免,我也知道有一种方法可以通过命令行解决这个问题,但我不记得怎么样,也无法在互联网上找到任何东西。
任何帮助,将不胜感激。谢谢
最佳解决方法
它看起来像sudo dpkg --configure -a
是神奇的命令。
以下是dpkg
手册页对--configure -a
选项的说明:
--configure
package…|-a
|--pending
Configure a package which has been unpacked but not yet configured. If
-a
or--pending
is given […], all unpacked but unconfigured packages are configured.[…]
Configuring consists of the following steps:
Unpack the conffiles, and at the same time back up the old conffiles, so that they can be restored if something goes wrong.
Run postinst script, if provided by the package.
次佳解决方法
我建议试试这个:
sudo apt-get install aptitude
sudo aptitude update
sudo aptitude dist-upgrade
解决了我的问题,也许对你有用。
第三种解决方法
我有同样的问题。我做的是,从sudo apt-get upgrade
获取包列表。就我而言:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages have been kept back:
linux-generic linux-headers-generic linux-image-generic
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
然后我用sudo apt-get install linux-generic linux-headers-generic linux-image-generic
安装了”not upgraded”包,问题解决了。