
我正在使用 Debian 8 Jessie 作業系統。我損壞了 jitsi 軟體包的安裝。我需要從我的電腦上卸載 jitsi。我做不到。這是我從終端的輸出:
root@debian:~# apt-get purge --remove jitsi*
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'jitsi-meet-prosody' for regex 'jitsi*'
Note, selecting 'jitsi-meet' for regex 'jitsi*'
Note, selecting 'jitsi-meet-tokens' for regex 'jitsi*'
Note, selecting 'jitsi-videobridge' for regex 'jitsi*'
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
jicofo : PreDepends: jitsi-videobridge but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
root@debian:~# 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:
lua-event lua-expat lua-filesystem lua-sec lua-socket lua5.1 prosody
Suggested packages:
lua-zlib lua-dbi-postgresql lua-dbi-mysql lua-dbi-sqlite3
Recommended packages:
lua5.1-sec lua5.1-event
The following packages will be REMOVED:
jitsi-meet-tokens
The following NEW packages will be installed:
lua-event lua-expat lua-filesystem lua-sec lua-socket lua5.1 prosody
0 upgraded, 7 newly installed, 1 to remove and 8 not upgraded.
2 not fully installed or removed.
Need to get 0 B/417 kB of archives.
After this operation, 2,175 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 174595 files and directories currently installed.)
Removing jitsi-meet-tokens (1.0.1073-1) ...
dpkg: error processing package jitsi-meet-tokens (--remove):
subprocess installed post-removal script returned error exit status 10
Errors were encountered while processing:
jitsi-meet-tokens
====== How can you help? (doc: https://wiki.debian.org/how-can-i-help ) ======
----- Show old opportunities as well as new ones: how-can-i-help --old -----
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@debian:~# apt-get purge jigasi jitsi-meet jicofo jitsi-videobridge
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package jigasi
root@debian:~# apt-get purge jitsi-meet jicofo jitsi-videobridge
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:
jitsi-meet-prosody : Depends: prosody but it is not going to be installed or
prosody-trunk but it is not installable
Depends: jitsi-videobridge but it is not going to be installed
Depends: jicofo but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
root@debian:~# apt-get purge jitsi-meet jicofo jitsi-videobridge
Reading package lists... Done
Building dependency tree
Reading state information... Done
^[[AYou might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
jitsi-meet-prosody : Depends: prosody but it is not going to be installed or
prosody-trunk but it is not installable
Depends: jitsi-videobridge but it is not going to be installed
Depends: jicofo but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
我無法刪除這個包。我可以從目錄樹訪問此包並手動將其刪除嗎?
答案1
首先dpkg --configure -a
清除該故障的任何殘留物。
之後,將套件明確jitsi-meet-prosody
新增至 的呼叫中apt-get purge
,以便它知道您的意圖確實是要刪除它 - 否則它會嘗試維護現有狀態。
事實上,根據您的意圖判斷,您可能只想清除,'jitsi.*'
這樣您就不會追逐每個新的子包。 (注意:apt-get
使用正規表示式,dpkg
使用 glob。)
答案2
如果沒有任何效果...請執行以下操作:
備份您的狀態檔案:
$ sudo cp /var/lib/dpkg/status /var/lib/dpkg/status_bk
檢查你的備份檔案是否存在
$ ls /var/lib/dpkg/
您也可以開啟備份狀態文件
$ less /var/lib/dpkg/status_bk
xed
使用(xed
是 Linux Mint 18 的預設文字編輯器,但gedit
如果系統中有可用的其他編輯器,例如 或 vi)來開啟目前狀態檔案:
$ sudo xed /var/lib/dpkg/status
按Ctrl+f找到您要刪除的套件。
例如:jitsi-meet-tokens
刪除或刪除有關目標包的所有條目文字。
在這種情況下(目標套件是 jitsi-meet-tokens),請刪除狀態檔案中的以下文字部分。
Package: jitsi-meet-tokens
Status: deinstall ok half-installed
Priority: extra
Section: net
Installed-Size: 53
Maintainer: Jitsi Team <[email protected]>
Architecture: all
Source: jitsi-meet
Version: 1.0.1073-1
Depends: debconf (>= 0.5) | debconf-2.0, prosody-trunk (>= 1nightly607), libssl-dev, luarocks, jitsi-meet-prosody
Description: Prosody token authentication plugin for Jitsi Meet
Homepage: https://jitsi.org/meet
然後按Ctrl+s儲存,現在讓我們檢查一下包錯誤是否已解決。
$ sudo apt-get update
享受!
https://forums.linuxmint.com/viewtopic.php?f=42&t=233205