LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Automake /usr/local/lib (https://www.linuxquestions.org/questions/programming-9/automake-usr-local-lib-555406/)

bendeco13 05-20-2007 04:08 PM

Automake /usr/local/lib
 
The application I'm writing uses a library that is located in '/usr/local/lib'. The application compiles fine, but when I execute it, I get the following error:
error while loading shared libraries: libfmodex.so: cannot open shared object file: No such file or directory
This is happening because the library is located in '/usr/local/lib' and the system isn't looking in that directory for the library. I could create a link to '/usr/lib', but I want to assume that other users won't know to do that, so I have to modify my Makefile.am file to include this library directory, and I was wondering if anyone could explain to me how I would go about doing that.

Thanks in advance,
Bendeco

Okie 05-20-2007 04:33 PM

ln -s /usr/local/lib/libfmodex.so /usr/lib


that should fix it without too much trouble...

bendeco13 05-20-2007 04:37 PM

Thankyou, but I did say:
Quote:

I could create a link to '/usr/lib', but I want to assume that other users won't know to do that.

jschiwal 05-20-2007 04:40 PM

Add /usr/local/lib to /etc/ld.so.conf and run "ldconfig".

Okie 05-20-2007 05:09 PM

umm, why? if you look around in Linux you will finds hundreds, maybe thousands of symlinks, one more wont hurt...

Okie 05-20-2007 05:48 PM

Quote:

Originally Posted by jschiwal
Add /usr/local/lib to /etc/ld.so.conf and run "ldconfig".

that does not always work, sometimes it does, sometimes not...

bendeco13 05-20-2007 06:50 PM

Thanks for yall's replies.
I tried the linking, but SELinux 'locked' up and wouldn't grant me permission to use the shared libraries, so I used Okie's method.
This worked, but the shared libraries were still 'locked', but I figured out how to fix that.

Okie 05-20-2007 07:23 PM

SELinux has only proven to me that it just makes doing things in Linux a bigger pain in the neck than it needs to be....


All times are GMT -5. The time now is 09:00 PM.