I ran into this misleading error as well. In my case the console log indicated:
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"'.
As instructed I ran 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...]
After that okular was able to load PDFs.
Seems like a packaging bug. That should have ran from a post-install script.
okular mypdf.pdf
and add the output to you question alternatively you can addnohup
to the begining of the command and any messages will be added to nohup.out making it easy to copy them, the command would look like thisnohup okular /home/user/mypdf.pdf