我安裝Java通過從java.com下載RPM文件(1.8.0-71)
和使用外星人生成.deb我安裝的文件。它失敗了,我不能刪除它了。Ubuntu刪除失敗的Java安裝(一半安裝)
如果我嘗試使用apt-get我總是得到一張紙條,我應該重新安裝包(如果它是那麼容易):
LC_ALL=C sudo dpkg --purge --force-all jre1.8.0-71
dpkg: warning: overriding problem because --force enabled:
dpkg: warning: package is in a very bad inconsistent state; you should
reinstall it before attempting a removal
(Reading database ... 84902 files and directories currently installed.)
Removing jre1.8.0-71 (1.8.071-1) ...
/var/lib/dpkg/info/jre1.8.0-71.postrm: line 586: /usr/sbin/alternatives: No such file or directory
dpkg: error processing package jre1.8.0-71 (--purge):
subprocess installed post-removal script returned error exit status 127
Errors were encountered while processing:
jre1.8.0-71
當我嘗試強制清除:
[email protected]:~$ sudo dpkg --force-all --purge jre1.8.0-71
dpkg: Warnung: Problem wird übergangen, weil --force angegeben ist:
dpkg: Warnung: Paket ist in einem sehr schlechten inkonsistenten Zustand - Sie sollten
es erneut installieren, bevor Sie es zu entfernen versuchen.
(Lese Datenbank ... 84902 Dateien und Verzeichnisse sind derzeit installiert.)
Entfernen von jre1.8.0-71 (1.8.071-1) ...
/var/lib/dpkg/info/jre1.8.0-71.postrm: Zeile 586: /usr/sbin/alternatives: Datei oder Verzeichnis nicht gefunden
dpkg: Fehler beim Bearbeiten des Paketes jre1.8.0-71 (--purge):
Unterprozess installiertes post-removal-Skript gab den Fehlerwert 127 zurück
Fehler traten auf beim Bearbeiten von:
jre1.8.0-71
包裝
狀態:
[email protected]:~/iRedMail-0.9.4$ dpkg -s jre1.8.0-71
Package: jre1.8.0-71
Status: purge reinstreq half-installed
Priority: extra
Section: alien
Installed-Size: 122630
Maintainer: faustdonner <[email protected]>
Architecture: amd64
Version: 1.8.071-1
Config-Version: 1.8.071-1
Conffiles:
/usr/java/jre1.8.0_71/.java/.systemPrefs/.system.lock d41d8cd98f00b204e9800998ecf8427e
/usr/java/jre1.8.0_71/.java/.systemPrefs/.systemRootModFile d41d8cd98f00b204e9800998ecf8427e
/usr/java/jre1.8.0_71/.java/init.d/jexec 3a4104cd0a34b5e7e55433a78d9f7721
/usr/java/jre1.8.0_71/lib/charsets.pack 05951e01ac743c82b30fd29269bda4cf
/usr/java/jre1.8.0_71/lib/deploy.pack 5b3940dd00902468af3c38f7af733fe2
/usr/java/jre1.8.0_71/lib/ext/jfxrt.pack 025c9f48e8accc9651338cc48a1e93b0
/usr/java/jre1.8.0_71/lib/ext/localedata.pack 311294753566ba95d9cd78ee9d427feb
/usr/java/jre1.8.0_71/lib/javaws.pack 1d6ea5448180750737c6fe71221f89b8
/usr/java/jre1.8.0_71/lib/jsse.pack 50a27dfb6b47ca44f904a6597e376f30
/usr/java/jre1.8.0_71/lib/plugin.pack 059b296ac6faa78cbe6b7148161c55b3
/usr/java/jre1.8.0_71/lib/rt.pack 83ea5f918d52994d3494f628438eba2e
Description: Java Platform Standard Edition Runtime Environment
The Java Platform Standard Edition Runtime Environment (JRE) contains
everything necessary to run applets and applications designed for the
Java platform. This includes the Java virtual machine, plus the Java
platform classes and supporting files.
.
The JRE is freely redistributable, per the terms of the included license.
.
(Converted from a rpm package by alien version 8.90.)
第二行表示,其在一個非常糟糕的不一致的狀態。它嘗試訪問尚未創建的文件夾,因此它在我嘗試的所有內容上都失敗。我是否可以刪除dpkg中的安裝條目,這樣就好像我從未安裝它一樣?我不在乎它是否超級乾淨,我只是想能夠再次使用apt-get。
發現力刪除軟件包答案:
http://www.piprime.fr/1480/manually-remove-broken-package-debian-ubuntu/
你應該問askubuntu.com –
而不是stackoverflow,考慮問這個超級用戶。您需要識別相關軟件包並將其刪除。下次嘗試使用突觸包管理器來安裝某些東西時。 – Limit
僅供參考:下次使用'LC_ALL = C'運行命令,它會將語言更改爲英文,更多信息請參見[LC_ALL = C做什麼?](http:// unix。在[Unix&Linux](https://unix.stackexchange.com/)上的stackexchange.com/q/87745/43400) – Ferrybig