I have recently upgraded from Kubuntu 16 to 18. When I try to run okular in a terminal (konsole) as a user (as I have been successfully doing before, in vs 16), in vs 18 it fails, giving a message error: "Unable to find the okular component: The shared library was not found". I can run okular from the Application Menu, and also from terminal provided I run it with sudo, but not when I try as a user. I wonder what has changed in the upgrading and how to fix the problem. Thanks.
Asked
Active
Viewed 1,086 times
2
2 Answers
0
Perhaps this is not the solution you are asking for, but I fixed this on my machine by removing the snap version of Okular and installing the apt version instead.

mikeglaz
- 163
-1
I found the answer to the mystery. It was in my .bashrc
file which contained a line:
export LD_LIBRARY_PATH=/usr/local/Qt/5.10.1/gcc_64/lib:$LD_LIBRARY_PATH
which caused this and other similarly odd problems with other applications (kile
for instance). This appeared after upgrading, as that line was harmless before. I must finally mention that the quoted library directory exists in my installation (i.e. the problem is not caused because the directory is lacking).

Rafael Lopez
- 19
-
1How did you then fix the issue? For example, on removing that line or giving another location? I gather that that path element had a purpose to provide Qt 5.10.1 to some other applications – XavierStuvw Dec 15 '19 at 08:35
okular
runs from the "Application Menu" but apparently not from the terminal unless the user usessudo
!!! Andokular
works for me whether I access it from the terminal or from the Application Menu or by double-clicking on a pdf file in Dolphin (the file manager). The mysteries of upgrading? – DK Bose Aug 29 '18 at 12:01okular
installed, and it's being run from the menu, but not from terminal (due to order of listed directories maybe - usesnap list
to view what snaps you have installed). With snaps you can multiple versions of programs installed. – guiverc Aug 29 '18 at 12:08find . -user root -ls
I suggest you refer to the link I posted above. – DK Bose Aug 29 '18 at 13:26okular
and/usr/bin/okular
. In both cases, the only message that I got is that appearing in a pop-up window as quoted in my query. No message appeared in the terminal. It is unlikely that some library is lacking as I can run okular in terminal as root. I have runsnap list
as suggested by @guiverc obtaining "No snaps are installed yet". I have followed the instructions in the link provided by @DKBose so that running in my userfind . -user root -ls
now gives no output. The problem remains the same. – Rafael Lopez Aug 30 '18 at 20:36okular file.pdf
(i.e. passing the name of an existing pdf file as argument), apart from the message in the pop-up window, I get this message in the terminal: "org.kde.kwindowsystem: Could not find any platform plugin" – Rafael Lopez Aug 30 '18 at 21:06chown
to yourself if owned by root) – guiverc Aug 30 '18 at 22:59pgrep okular
I get a pid. And, as mentioned elsewhere, I can launch the program regularly from the application menu: the problem only occurs in the shell. – XavierStuvw Dec 15 '19 at 08:38