12

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?

XavierStuvw
  • 1,451
  • 3
  • 16
  • 45
  • If you navigate to /snap/okular/39/usr/lib/x86_64-linux-gnu/qt5/plugins/ can you see the okularpart.so file? – FloT Jan 31 '19 at 09:52
  • @FloT yes! ..... – adibender Jan 31 '19 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 https://askubuntu.com/questions/1070081/okular-no-longer-working-in-terminal-after-kubuntu-18-upgrading, also related to qt5. The accepted answer does not apply to my case. – XavierStuvw Dec 15 '19 at 09:06

1 Answers1

6

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)

FloT
  • 2,326
  • snaps update automatically & without notice. 1st thing I'd try is to revert to previous snap if available – doug Jan 31 '19 at 16:36
  • Thanks the second thing worked, is there any way to find out what happened and if I did something wrong? – DeanTheMachine Jan 31 '19 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 Jan 31 '19 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 Oct 16 '21 at 03:03