python2.7:找不到:無法安裝或刪除任何套件

python2.7:找不到:無法安裝或刪除任何套件

我目前無法安裝任何軟體包。起初,它開始抱怨找不到/usr/bin/python(不是 100% 確定這裡的路徑),所以我嘗試使用 synaptic 重新安裝 python。重新安裝也失敗。

現在,我無法存取 Unity 中的側邊欄,而且鍵盤快捷鍵也不起作用。我可以通過右鍵單擊文件並選擇“打開方式...”來訪問 Chrome,然後使用Alt- Ctrl-訪問命令行,f#但僅此而已。

sudo apt-get install用結果做了:

Reading package lists...
Building dependency tree...
Reading state information...
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 apturl : Depends: gconf2 (>= 2.28.1-2)
 gwibber : Depends: libgwibber-gtk2 (>= 3.1.4.1+r1119) but it is not installed
    Depends: libgwibber2 (>= 3.1.4.1) but it is not installed
 ibus : Depends: gconf2 (>= 2.28.1-2)
 libgksu2-0 : Depends: gconf2 (>= 2.28.1-2)
 update-manager : Depends: gksu but it is not installed

以及sudo apt-get -f install結果:

Reading package lists...
Building dependency tree...
Reading state information...
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  libgtkspell0 liblaunchpad-integration1
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  gconf2 gksu gwibber gwibber-service language-selector-common
  language-selector-gnome libgwibber-gtk2 libgwibber2
Suggested packages:
  gconf-defaults-service gwibber-service-flickr gwibber-service-digg
  gwibber-service-statusnet gwibber-service-foursquare
  gwibber-service-friendfeed gwibber-service-pingfm gwibber-service-qaiku
  unity-lens-gwibber
Recommended packages:
  gwibber-service-facebook gwibber-service-twitter gwibber-service-identica
The following NEW packages will be installed:
  gconf2 gksu libgwibber-gtk2 libgwibber2
The following packages will be upgraded:
  gwibber gwibber-service language-selector-common language-selector-gnome
4 upgraded, 4 newly installed, 0 to remove and 5 not upgraded.
15 not fully installed or removed.
Need to get 0 B/866 kB of archives.
After this operation, 1,281 kB of additional disk space will be used.
Do you want to continue [Y/n]? Setting up python-minimal (2.7.3-0ubuntu2) ...
/var/lib/dpkg/info/python-minimal.postinst: 4: /var/lib/dpkg/info/python-minimal.postinst: python2.7: not found
dpkg: error processing python-minimal (--configure):
 subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
 python-minimal

任何幫助都會很棒。看來我100%完蛋了。

我檢查了我的/usr/bin directory

lrwxrwxrwx 1 nolando nolando 9 Apr 17  2012 python -> python2.7  
lrwxrwxrwx 1 nolando nolando 9 Apr 17  2012 python2 -> python2.7

我正在使用 12.04。

答案1

哦,解壓縮你的 python .deb 時出現了嚴重錯誤。試試看dpkg -i /var/cache/apt/archives/python2.7-minimal*deb是否可以修復 dpkg 錯誤。

答案2

類似的問題在這裡http://ubuntuforums.org/showthread.php?t=1721421由於 python 具有廣泛的依賴性,因此透過重新安裝解決了問題。

但嘗試此論壇的解決方案http://ubuntuforums.org/showthread.php?t=1425619,可能只是關於 python 配置和版本

嘗試一下/usr/bin/python,如果結果很奇怪,請給我們留言或嘗試手動查找 python。也許符號連結就足夠了。

相關內容