LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Frustrated with environment variables (https://www.linuxquestions.org/questions/linux-newbie-8/frustrated-with-environment-variables-225736/)

Kilahchris 09-02-2004 11:06 AM

Frustrated with environment variables
 
I am fustrated with environment variables they never seem to work for me.
Im most likely invoking them wrongly. (running Suse 9.0)


For example I compiled and installed lame (mp3 encoder/decoder) the libmp3lame.so.0 installed in the usr/local/lib directory. This shared library is significant because im trying to install avidemux-2.0.28-Suse9.0KDE3.1.4.i686.rpm this package complains about not finding this libmp3lame.so file. so I now run

cd /lame-3.96
make uninstall
make clean
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
ldconfig (im not sure about how to use ldconfig and the man pages for it were more confusing)

I then compiled and install the lame source code and I verified that the program installed and by default the libmp3lame.so.0 is found in the /usr/local/lib ( I was also able to see it there)

however when i tried to install rpm -ivh avidemu-xxxxxx it still complains about the libmp3lame.so.0

although the environment variable set in to the right directory
echo $LD_LIBRARY_PATH


now i know i can probably simple fix this problem with a simple link of the libmp3lame.so file to the directory avidemux is looking for. But i want to know why that I can never get Environment variables to work in Bash terminal. I have the same problem with some other environment variables like PK_CONFIG_PATH

Demonbane 09-02-2004 11:11 AM

You're doing everything correctly, however what's happening is that RPMs check the rpm database for dependencies, not the actual files on the filesystem which you installed from the source.
It will complain unless you install an RPM that provides libmp3lame.so.0
If you want to install it anyway use --nodeps

Kilahchris 09-02-2004 11:56 AM

great idea....
i wonder why i never thought about it the --nodeps

but if i install it with --nodeps will it be able to find the libmp3lame.so.0???


and how do i use the ldconfig command?

Demonbane 09-02-2004 12:06 PM

Yea with --nodeps you're just bypassing dependency check on the RPM you want to install, as long as the library file the actualy software needs does exist, it should work.
I think by defailt /usr/local/lib is already in the library path, all you need to do is run ldconfig once the library is installed, in fact many packages do this for you already when you "make install"

Kilahchris 09-02-2004 12:09 PM

ok just for reference when i run ldconfig it is just ldconfig and nothing else like ldconfig -v (or some other tag?

detpenguin 09-02-2004 12:34 PM

it's just ldconfig. in suse (maybe all distro's, i'm not sure) it has to be run as root, so su first.

Kilahchris 09-02-2004 02:08 PM

Quote:

run as root, so su first.
what if i am logged as root???





just curious what is the difference between ldconfig /usr/local/lib and export LD_LIBRARY_PATH:/usr/local/lib$LD_LIBRARY_PATH_PATH

detpenguin 09-02-2004 03:15 PM

Quote:

what if i am logged as root???
if you're logged in as root, just run ldconfig in a terminal...


All times are GMT -5. The time now is 03:12 PM.