在 Ubuntu 13.04 中,软件更新程序显示某些应用程序有更新,但它们不可选择:
不清楚为什么它们会变灰。
在命令行上:
$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages have been kept back:
gnuplot-nox gnuplot-x11 nvidia-current
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
还要注意的是,运行apt-get dist-upgrade
也不会导致它们被安装,但有时对于保留的包却会这样。输出如下:
$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
gnuplot-nox gnuplot-x11 nvidia-current
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
我采纳了@quidage的建议,结果如下。但是后续升级仍显示相同的消息:
$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
答案1
就我而言,apt-get --with-new-pkgs upgrade
这无法解决我的问题,但我获得了软件包名称libodbc1
和wine-stable
以下名称The following packages have been kept back
:
xb@dnxb:~$ sudo apt-get --with-new-pkgs upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
libodbc1 wine-stable
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
然后只需手动查看apt install
该特定包即可查看相关的错误详细信息:
xb@dnxb:~$ sudo apt-get install wine-stable
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:
wine-stable : Depends: wine-stable-i386 (= 5.0.1~bionic)
Depends: wine-stable-amd64 (= 5.0.1~bionic) but 4.0.3~bionic is to be installed
E: Unable to correct problems, you have held broken packages.
xb@dnxb:~$ sudo apt-get install libodbc1
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
msodbcsql17 unixodbc-bin
The following packages will be REMOVED:
libodbc1:i386
The following packages will be upgraded:
libodbc1
1 upgraded, 0 newly installed, 1 to remove and 3 not upgraded.
Need to get 511 kB of archives.
After this operation, 657 kB disk space will be freed.
Do you want to continue? [Y/n]
答案2
The following packages have been kept back:
通常意味着你有升级并不是更新的包裹。
sudo apt-get dist-upgrade
将修复此问题。它将显示以下消息...
The following NEW packages will be installed:
和
The following packages will be upgraded:
答案3
检查你的包裹的状态:
dpkg --get-selections | grep "name of your package"
如果显示该状态,hold
则无法选中软件更新程序窗口中的复选框。
删除hold
运行
sudo apt-mark unhold "name of your package"
答案4
一种解释可能是分阶段更新:
一旦更新发布到 -updates,更新就会分阶段进行,以便逐步向不断扩大的 Ubuntu 用户子集提供更新。此过程使我们能够自动监控回归问题,并在发现任何问题时停止更新过程。