更新

更新

我今天尝试安装mercurial,结果断电了。现在,当我尝试安装任何软件包时,它都会抱怨几件不同的事情:

>$ sudo apt-get install mercurial 
[sudo] password: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
mercurial is already the newest version.
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
hunspell-en-us : Conflicts: 
openoffice.org-core (<= ) but 1:3.2.1-7ubuntu1.1 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' 
with no packages (or specify a solution).
>$ hg
The program 'hg' is currently not installed.  You can install it by typing:
sudo apt-get install mercurial
>$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  hunspell-en-us
Suggested packages:
  hunspell
The following packages will be upgraded:
  hunspell-en-us
1 upgraded, 0 newly installed, 0 to remove and 33 not upgraded.
Need to get 0B/249kB of archives.
After this operation, 0B of additional disk space will be used.
Do you want to continue [Y/n]? y
debconf: unable to initialize frontend: Dialog
debconf: falling back to frontend: Readline
warning, in file '/var/lib/dpkg/status' near line 10469 package 'hunspell-en-us':
 `Conflicts' field, reference to `openoffice.org-core':
 `<' is obsolete, use `<=' or `<<' instead
warning, in file '/var/lib/dpkg/status' near line 10469 package 'hunspell-en-us':
 `Conflicts' field, reference to `openoffice.org-core':
 version value starts with non-alphanumeric, suggest adding a space
dpkg: parse error, in file '/var/lib/dpkg/status' 
near line 10469 package 'hunspell-en-us':
 `Conflicts' field, reference to `openoffice.org-core': version contains ` '
E: Sub-process /usr/bin/dpkg returned an error code (2)
$ sudo dpkg --purge hunspell-en-us
warning, in file '/var/lib/dpkg/status' near line 10469 package 'hunspell-en-us':
 `Conflicts' field, reference to `openoffice.org-core':
 `<' is obsolete, use `<=' or `<<' instead
warning, in file '/var/lib/dpkg/status' near line 10469 package 'hunspell-en-us':
 `Conflicts' field, reference to `openoffice.org-core':
 version value starts with non-alphanumeric, suggest adding a space
dpkg: parse error, in file '/var/lib/dpkg/status' near line 10469 package 'hunspell-en-us':
 `Conflicts' field, reference to `openoffice.org-core': version contains ` '

我希望我可以给你更多的提示...我尝试进入突触并通过我的损坏包裹进行过滤......hunspell-en-us确实回来了,因为它坏了......所有选项都以与上面发布的几乎相同的方式失败。

我很感激任何帮助。我担心我可能必须清除/卸载/重新安装openoffice.org-core,但在咨询这里的每个人之前,这样做有点太疯狂了。

我也尝试过清除:

>$ sudo apt-get purge
[sudo] password for droogans: 
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:
 hunspell-en-us : Conflicts: openoffice.org-core (<= ) but 1:3.2.1-7ubuntu1.1 is installed
E: Unmet dependencies. Try using -f.
>$ sudo apt-get purge -f

最后一个命令也没有做任何不同的事情。认为是时候卸载 openoffice 以及随之而来的 15 多个软件包了吗?

更新

我决定尝试从 synaptic 中选择“完全删除” openoffice.org-core,并允许它连同其依赖项一起删除,从而摆脱困境。我打算之后重新安装 + 更新每个软件包,但它仍然不让我继续。错误消息与之前相同,现在我想知道我还有什么其他选择。

我的计算机上的一切均运行正常...除了获取新的、更新现有的、修复或删除机器上的软件包。

解决

运行后,sudo dpkg-reconfigure -a我得到了最后一行,这是新的一行:

/usr/sbin/dpkg-reconfigure: acpi-support is not installed

经过快速搜索,结果显示此解决方案

$> cd /var/lib/dpkg
$> sudo cp status-old status
$> sudo cp available-old available
$> sudo apt-get install -f

这解决了问题。我不得不进入 synaptic 进行正版重新安装,但之后它就正常工作了。

最后,谢谢大家。

答案1

Adpkg-reconfigure -a多次帮助我解决更新崩溃的问题。相反,dpkg --configure -a它甚至会尝试重新配置已经开始配置的包。

答案2

sudo apt-get -f install应该可以解决你的问题。

答案3

我会添加一个“绝望的答案”,因为你似乎急于修复它。你可能已经尝试过其中一些方法了。

  • 尝试使用aptitude而不是apg-get。它至少apt-get在解决冲突方面比以前更智能,也许它以不同的方式处理这种情况(尽管我听说现在两者之间没有太大区别)。
  • 尝试sudo aptitude purge hunspell-en-us,甚至sudo aptitude purge openoffice.org-core稍后重新安装它们。
  • 下载hunspell-en-us来自 debian.org 的软件包(或者来自 Ubuntu,您没有说您使用的是哪个发行版)并尝试直接使用它来安装它dpkg
  • (戴上安全护目镜:)尝试将其移动到/var/lib/dpkg/status其他地方,看看是否会在使用 APT 时尝试重建。如果情况变得更糟,请将其移回。

答案4

sudo dpkg --configure -a应该修复你的 dpkg 数据库。然后更新并尝试安装软件包

相关内容