今天我在網路上發現說Okular是一個非常好的文件檢視器。所以我從軟體中心安裝了它。安裝後,Okular 無法開啟任何 PDF 檔案。實際上它無法打開文件。它總是抱怨“找不到插件...”和“無法打開... pdf 文件”。
我查了一下這個網站,發現有人說我們應該刪除~/.kde/share/
.但我在那裡沒有找到這些文件。
順便說一句,我正在使用 Unity 桌面。
答案1
我遇到了同樣的問題,所以我嘗試了命令:
$kbuildsycoca4
但感覺可以運行,因為我需要安裝一些 kde 庫。然後我安裝了這樣的庫,輸入:
sudo apt-get install kdelibs-bin
之後 Okular 就可以開啟 PDF 了。
這是一個錯誤嗎?我正在全新安裝中運行 Linux Mint 17.1。
答案2
OP 在評論中發布了解決方案
我使用目錄 /home/heng/.kde/chache 和 /home/heng/.kde/cache-guangchun 的 chmod 將模式改為 777,現在可以使用了。
答案3
我也遇到了這個誤導的錯誤。就我而言,控制台日誌顯示:
okular(30121)/kdecore (trader): KMimeTypeTrader: couldn't find service type "okular/Generator"
Please ensure that the .desktop file for it is installed; then run kbuildsycoca4.
okular(30121)/okular (app) Okular::Document::openDocument: No plugin for mimetype '"application/pdf"'.
按照指示我運行了 kbuildsycoca4:
~% kbuildsycoca4
kbuildsycoca4 running...
kbuildsycoca4(30132) kdemain: Reusing existing ksycoca
kbuildsycoca4(30132) KBuildSycoca::recreate: Recreating ksycoca file ("/var/tmp/kdecache-tmetro/ksycoca4", version 205)
kbuildsycoca4(30132) KBuildSycoca::createEntry: new: "okularGenerator.desktop" in servicetypes
kbuildsycoca4(30132) KBuildSycoca::createEntry: new: "libokularGenerator_xps.desktop" in services
kbuildsycoca4(30132) KBuildSycoca::createEntry: new: "okularEPub.desktop" in services
kbuildsycoca4(30132) KBuildSycoca::createEntry: new: "okularPlucker.desktop" in services
kbuildsycoca4(30132) KBuildSycoca::createEntry: new: "libokularGenerator_fax.desktop" in services
[...etc for several screen...]
之後 okular 就可以載入 PDF 了。
看起來像是包裝錯誤。這應該是從安裝後腳本運行的。