手動刪除所有檔案破壞了 Okular

手動刪除所有檔案破壞了 Okular

我手動刪除了與 Okular(pdf 檢視器)相關的所有檔案並重新安裝了它,因為存在清除和重新安裝無法解決的錯誤。現在它不起作用並拋出錯誤:

Unable to find the Okular component.

第一次嘗試運行終端時也會輸出錯誤

Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
kbuildsycoca4 running...
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.

然而,這僅在最初發生。

我運行的是 Kubuntu 16.04,它是一個相對全新的安裝。

我想我需要重新下載一些與 Okular 相關的程式文件,但我不確定在哪裡或如何執行此操作。我嘗試過使用

sudo apt-get install -f
sudo apt-get install --reinstall okular
sudo apt-get purge okular

然後重新安裝。我還嘗試更新軟體包以防萬一。


編輯

我先使用指令卸載了okular

sudo apt-get purge okular

然後我使用了命令

sudo find / -name "*okular*" | xargs rm

編輯2

命令

dpkg -S 'okular' | awk -F: '!a[$1]++ {print $1}'

輸出此資訊:

dpkg-query: warning: files list file for package 'libokularcore7'     missing; assuming package has no files currently installed
okular-extra-backends
okular-backend-odp
okular
okular-dev
kde-l10n-engb
libsmokeokular3
kubuntu-settings-desktop
calligra-l10n-engb
breeze-icon-theme
libokular-perl

答案1

其中一個依賴項已被破壞。我認為是 libokularcore7 之一。

在按照評論部分中提到的步驟 @steeldriver 進行操作後,即使用以下命令:

sudo dpkg -S 'okular' | awk -F: '!a[$1]++ {print $1}'

我能夠使用以下命令重新安裝所有依賴項:

for i in $(sudo dpkg -S 'okular' | awk -F: '!a[$1]++ {print $1}');
do sudo apt-get install --reinstall $i;
done

然後使用指令單獨重新安裝 libokularcore7

sudo apt-get install --reinstall libokularcore7

相關內容