13

I have made my laptop double boot a few months again, with Ubuntu 18.04.1 . I have been working with okular to open pdf files (for the commenting option) but suddenly okular doesn't work anymore. When trying to open okular I get the following error:

Unable to find the Okular component: Cannot load library /snap/okular/39/usr/lib/x86_64-linux-gnu/qt5/plugins/okularpart.so: (libKF5JSApi.so.5: cannot open shared object file: No such file or directory)

I don't understand how to solve this problem. Okular was working fine until today and I didn't change anything to my ubuntu system in the mean time. Perhaps the problem comes from the fact that I have been working on windows the last few days and also used the windows ubuntu app.

How can I make okular work again?

3
  • If you navigate to /snap/okular/39/usr/lib/x86_64-linux-gnu/qt5/plugins/ can you see the okularpart.so file?
    – FloT
    Commented Jan 31, 2019 at 9:52
  • @FloT yes! .....
    – adibender
    Commented Jan 31, 2019 at 10:17
  • Similar problem after having installed okular with apt in Ubuntu 18.04. Yet I do not get the indication of the failing library. My issue is like askubuntu.com/questions/1070081/…, also related to qt5. The accepted answer does not apply to my case. Commented Dec 15, 2019 at 9:06

1 Answer 1

7

I understand that you've installed Okular from snap. It seems that the file okularpart.so either got corrupted or its permissions changed. You can try the following things to fix Okular until one succeeds:

  1. Try to refresh the snaps: sudo snap refresh

  2. Try to remove and reinstall Okular: sudo snap remove okular && sudo snap install okular

  3. Remove Okular snap and give a try to apt install: sudo snap remove okular && sudo apt install okular (there are quite a lot of dependencies if you use a GTK based environment such as Gnome)

4
  • snaps update automatically & without notice. 1st thing I'd try is to revert to previous snap if available
    – doug
    Commented Jan 31, 2019 at 16:36
  • Thanks the second thing worked, is there any way to find out what happened and if I did something wrong? Commented Jan 31, 2019 at 21:52
  • Good question... doug mentions the possibility to go back to previous version. If it works, it means that an update went bad or was interrupted. Something worth to try anyway. Otherwise I don't know. One thing that will be good to know as well is: does it happen again? And looking on Ask Ubuntu or similar websites will also help you to know if you're the only one having this issue or if it is frequent. But basically, I cannot help you on the root cause of your issue :s
    – FloT
    Commented Jan 31, 2019 at 22:56
  • 2
    I am using Ubuntu 20.04 in which ``snap'' is the default package manager. For this release, better use the third solution straight. It works just fine. Thanks a lot.
    – Many
    Commented Oct 16, 2021 at 3:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .