我正在运行 Ubuntu 12.04 (Precise Pangolin),并且已通过安装升级了 xorg xserver-xorg-lts-saucy
。我现在想升级到xserver-xorg-lts-trusty
,但当我尝试升级时apt-get install xserver-xorg-lts-trusty
,我得到了一大堆未满足的依赖关系:
% sudo apt-get install xserver-xorg-lts-trusty
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:
xserver-xorg-lts-trusty : Depends: xserver-xorg-core-lts-trusty (>= 2:1.11) but it is not going to be installed
Depends: xserver-xorg-video-all-lts-trusty but it is not going to be installed or
xorg-driver-video
Depends: xserver-xorg-input-all-lts-trusty but it is not going to be installed or
xorg-driver-input
Depends: xserver-xorg-input-evdev-lts-trusty but it is not going to be installed
Recommends: libgl1-mesa-dri-lts-trusty but it is not going to be installed
Recommends: libgl1-mesa-glx-lts-trusty but it is not going to be installed
Recommends: xserver-xorg-input-all-lts-trusty but it is not going to be installed
Recommends: xserver-xorg-video-all-lts-trusty but it is not going to be installed
Recommends: x11-xserver-utils-lts-trusty but it is not going to be installed
Conflicts: libgl1-mesa-glx (>= 0~)
Conflicts: libgl1-mesa-glx:i386 (>= 0~)
Conflicts: libglapi-mesa (>= 0~)
Conflicts: libglapi-mesa:i386 (>= 0~)
E: Unable to correct problems, you have held broken packages.
我曾经apt-mark showhold
查看过被保留的软件包,但发现没有。此外,我还尝试使用 aptitude 而不是 apt-get 来执行升级,但建议的解决冲突的方法在我看来都不合理。
从 xserver-xorg-lts-saucy 升级到 xserver-xorg-lts-trusty 的推荐方法是什么?
答案1
您必须同时升级命名的软件包:
sudo apt-get install xserver-xorg-lts-trusty \
xserver-xorg-core-lts-trusty \
xserver-xorg-video-all-lts-trusty \
xorg-driver-video \
xserver-xorg-input-all-lts-trusty \
xorg-driver-input \
xserver-xorg-input-evdev-lts-trusty
如果您遇到有关名称中带有 trusty 的其他软件包的任何错误,也请将它们添加到列表中。
答案2
实际上,正确的方法是先修复损坏的软件包,以便您可以在安装新软件包之前正确地删除它。
sudo apt-get install -f
一旦安装了所有缺失的依赖项,然后运行:
sudo apt-get dist-upgrade
当它完成后,此时您有两个选择,手动删除遇到问题的软件包,或者进行完整的版本升级,这是推荐的方法。
因此你可以选择:
sudo apt-get remove xserver-xorg-lts-saucy
sudo apt-get install xserver-xorg-lts-trusty
或者你可以这样做:
sudo do-release-upgrade
在最坏的情况下,如果您已经升级到 14.04,但是 xserver 仍然停留在旧版本上,无论原因如何,您可以执行这个疯狂的举动来删除所有 xserver 文件,以便您可以从存储库重新安装。
sudo apt-get 删除 xserver*
这样做还会删除您的 Unity 或 Gnome,或您已安装的任何桌面环境,因此您必须重新安装您选择的桌面环境,这将自动为您获取缺少的 xserver 包。
如果你喜欢 Unity 桌面,请执行以下操作:
sudo apt-get install ubuntu-desktop
或者如果你更喜欢 gnome 桌面,请执行以下操作:
sudo apt-get install ubuntu-gnome-deskop
答案3
尝试这个:
sudo do-release-upgrade
下载和安装可能需要几个小时。
升级到 Ubuntu Trusty Tahr 后,请尝试再次安装 xorg!
祝你好运!