更新

更新

我今天嘗試安裝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 個以上軟體包了嗎?

更新

我決定嘗試從突觸 for 中選擇「完全刪除」來擺脫困境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 資料庫。然後更新並嘗試安裝軟體包

相關內容