2011-04-24 96 views
0

當我試圖安裝各種封裝,例如gitk和ruby1.8的-dev的,我收到以下的輸出:語言選擇器,常見在Ubuntu 10.10

Setting up language-selector-common (0.6.7) ...
dpkg: error processing language-selector-common (--configure):
subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of language-selector:
language-selector depends on language-selector-common (= 0.6.7); however:
Package language-selector-common is not configured yet.
dpkg: error processing language-selector (--configure):
dependency problems - leaving unconfigured
Processing triggers for python-central ...
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
language-selector-common
language-selector
E: Sub-process /usr/bin/dpkg returned an error code (1)

我試圖迫使依賴關係,並刪除var/lib/dpkg/status中的條目以及更多其他內容,都失敗了。

我在虛擬機上的虛擬機上運行這個,如果有幫助的話。

回答

0

你需要編輯安裝後文件:

sudo vi /var/lib/dpkg/info/language-selector-common.postinst 

尋找此行:

kill $(pgrep -U root '^ls-dbus-backend$') 2>/dev/null 

追加||真正使得它的樣子:

kill $(pgrep -U root '^ls-dbus-backend$') 2>/dev/null || true 

然後運行:

sudo apt-get update && sudo apt-get upgrade