我试图修复在 Sony Vaio VGN-NS135E 上安装 Ubuntu 12.04 64 位时出现的双显示器问题。
我运行了以下命令(从以下位置下载了 deb -https://launchpad.net/ubuntu/+source/xorg/1:7.6+12ubuntu1/+build/3309759):
sudo dpkg -i xorg_7.6+12ubuntu1_amd64.deb
因为我很沮丧,有人告诉我恢复 xorg 可能会有帮助。我最终以某种方式解决了我遇到的显示器问题,但现在我遇到了安装失败的问题。(顺便说一句,一旦我在启动前插入显示器并重新启动,显示器现在就可以正常工作了。)
我现在的错误是,我有一个部分配置的 xorg 包,似乎无法删除它。我也无法打开软件中心,因为它不想修复,修复失败的原因与下一个代码块相同。以下是 sudo apt-get autoremove 的输出:
sudo apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
xorg : Depends: xserver-xorg (>= 1:7.6+12ubuntu1)
E: Unmet dependencies. Try using -f.
我已尝试帖子上的所有命令:如何强制配置部分安装的软件包?
以下是 sudo apt-get install -f 的输出:
sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
xorg
Suggested packages:
xorg-docs xfonts-100dpi xfonts-75dpi
The following packages will be upgraded:
xorg
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 2,718 B of archives.
After this operation, 1,024 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main xorg amd64 1:7.6+12ubuntu2 [2,718 B]
Fetched 2,718 B in 0s (9,195 B/s)
dpkg: dependency problems prevent configuration of xorg:
xorg depends on xserver-xorg (>= 1:7.6+12ubuntu1); however:
Package xserver-xorg is not installed.
dpkg: error processing xorg (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
xorg
更新: 以下是 sudo dpkg --configure xorg 的输出:
dpkg: dependency problems prevent configuration of xorg:
xorg depends on xserver-xorg (>= 1:7.6+12ubuntu1); however:
Package xserver-xorg is not installed.
dpkg: error processing xorg (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
xorg
更新 2 运行 sudo apt-get install aptitude 会导致以下结果:
sudo apt-get install aptitude
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
aptitude : Depends: libboost-iostreams1.46.1 (>= 1.46.1-1) but it is not going to be installed
Depends: libcwidget3 but it is not going to be installed
Depends: libept1.4.12 but it is not going to be installed
Recommends: libparse-debianchangelog-perl but it is not going to be installed
xorg : Depends: xserver-xorg (>= 1:7.6+12ubuntu1)
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
更新 3 运行以下命令(sudo dpkg -r xorg):
sudo dpkg -r xorg
dpkg: dependency problems prevent removal of xorg:
ubuntu-desktop depends on xorg.
dpkg: error processing xorg (--remove):
dependency problems - not removing
Errors were encountered while processing:
xorg
但到目前为止还没有成功。我希望这些信息足够了,感谢您的帮助!
答案1
在虚拟控制台 (ctrl+alt+F1) 上尝试以下命令,
sudo service lightdm stop
sudo dpkg --purge --force-all --force-remove-reinstreq xorg
sudo apt-get install xorg
在 tty 中执行上述命令是安全的。
reinst-required
A package marked reinst-required is broken and requires rein‐
stallation. These packages cannot be removed, unless forced with
option --force-remove-reinstreq
purge
The package is selected to be purged (i.e. we want to remove
everything from system directories, even configuration files).
force-all
Set all force options