LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-02-2004, 12:06 PM   #1
Kilahchris
Member
 
Registered: Jan 2003
Location: NY
Distribution: Suse 9.0
Posts: 202

Rep: Reputation: 30
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
 
Old 09-02-2004, 12:11 PM   #2
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
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
 
Old 09-02-2004, 12:56 PM   #3
Kilahchris
Member
 
Registered: Jan 2003
Location: NY
Distribution: Suse 9.0
Posts: 202

Original Poster
Rep: Reputation: 30
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?
 
Old 09-02-2004, 01:06 PM   #4
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
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"
 
Old 09-02-2004, 01:09 PM   #5
Kilahchris
Member
 
Registered: Jan 2003
Location: NY
Distribution: Suse 9.0
Posts: 202

Original Poster
Rep: Reputation: 30
ok just for reference when i run ldconfig it is just ldconfig and nothing else like ldconfig -v (or some other tag?
 
Old 09-02-2004, 01:34 PM   #6
detpenguin
Senior Member
 
Registered: Oct 2003
Location: lost in the midwest...
Distribution: Slackware
Posts: 1,091

Rep: Reputation: 45
it's just ldconfig. in suse (maybe all distro's, i'm not sure) it has to be run as root, so su first.
 
Old 09-02-2004, 03:08 PM   #7
Kilahchris
Member
 
Registered: Jan 2003
Location: NY
Distribution: Suse 9.0
Posts: 202

Original Poster
Rep: Reputation: 30
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

Last edited by Kilahchris; 09-02-2004 at 03:13 PM.
 
Old 09-02-2004, 04:15 PM   #8
detpenguin
Senior Member
 
Registered: Oct 2003
Location: lost in the midwest...
Distribution: Slackware
Posts: 1,091

Rep: Reputation: 45
Quote:
what if i am logged as root???
if you're logged in as root, just run ldconfig in a terminal...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
environment variables moeminhtun Linux - General 4 01-15-2003 10:50 AM
Environment variables kdnt Linux - Newbie 11 11-01-2002 09:19 AM
Environment Variables if you su concoran Linux - Newbie 1 08-16-2002 08:18 PM
environment variables. jISV Linux - General 0 04-05-2002 07:01 AM
environment variables aethereal Linux - Newbie 7 12-19-2001 10:34 AM


All times are GMT -5. The time now is 01:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration