Ubuntu: Evince: error while loading shared libraries: Permission denied



Question:

While opening a PDF, I get a permission denied error, while ROOT.

root@brix:~# evince *.pdf  evince: error while loading shared libraries: libz.so.1: failed to map segment from shared object: Permission denied  

This started happening after:

mv /usr/local /opt/local  ln -s /opt/local /usr/local  

(I did this so I could rsync a single /opt/ folder as a backup)

note: I had a compiled libz.so.1 located in /usr/local/lib (along with libpoppler and friends), I don't think this would be an issue otherwise


Solution:1

This is not the way to debug a problem with apparmor at all.

You use sudo aa-logprof to examine the logs for problems. You will then be given an opportunity to review any problems in the logs and modify your aa profile.

It is always a good idea to first back up the origional file (back it up in /root/aa-profiles).

After reviewing the logs, it is always a good idea to then manually review the profile and make sure it makes sense.

See:

https://wiki.ubuntu.com/DebuggingApparmor

http://www.insanitybit.com/2012/05/29/apparmor-how-to/

http://blog.bodhizazen.net/linux/apparmor-privoxy-profile/


Solution:2

Its actually AppArmor to blame.

root@brix:~# apparmor_status  apparmor module is loaded.  14 profiles are loaded.  14 profiles are in enforce mode.  /usr/bin/evince  

Installing (apt-get install apparmor-utils) and applying the following workaround

root@brix:~# aa-complain /usr/bin/evince  Setting /usr/bin/evince to complain mode.  

Running this again

root@brix:/etc# apparmor_status  apparmor module is loaded.  14 profiles are loaded.  11 profiles are in enforce mode.  

Allows you to successfully launch Evince. More information https://help.ubuntu.com/community/AppArmor , including proper ways to modify the apparmor profile.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »