Library's version

Hi there.

I had a problem.

I'm trying to install a application that needs libpcap 0.8.1.  I'm running RH9.0 that has libpcap 0.7 installed.

I downloaded, compiled and "make install" libpcap0.8.1 sucessfully into /usr/local/lib.  However when I run ./configure of the application, it still tells me that it is using libpcap 0.7.

I copied /usr/local/lib/libpcap.a to /usr/local/lib, still the same result.

My questions:

1) How do I clear up this? the RPM installed version 0.7 but I compiled and install 0.8.1, when is it not reflected?
2) Do I need to uninstall the RPM version before "make install" the old version?
3) If I "upgarde" a rpm package and fail due to dependencies of other packages, what should I do?

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You man need to set the LD_LIBRARY_PATH environament variable to tell your application to look for libraries in /usr/local/lib. Do it like this (assuming bash or ksh shell)

 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

If you want to see which libraries your application will dynamically link when you try to run it, try the following command:

 ldd <path>

where <path> is the full path to your application (eg. "ldd /bin/ls" instead of just "ldd ls").
Also, uninstall the old version of libpcap. Also, it would be preferred if you can locate the Red Hat RPM for latest version of libpcap and update the old package.
kwseowAuthor Commented:
I actually did a "rpm -U --nodeps --force".

So what happen is that the package is now succesfully upgrade.  My new application runs but my old application (ethereal in this case) fails to run anymore.

Any suggestions?

> rpm -U --nodeps --force
--nodeps is not recommended, especially for the library.

First , please download
and do
# rpm -e libpcap-0.8.1   (do "rpm -q libpcap" to check)
and then
# rpm -ivh libpcap-0.7.2-7.9.3.legacy.i386.rpm

Second, install the libcap-0.8.1 to /usr/local/lib (like you did before)
# export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
Put /usr/local/lib before the original LD_LIBRARY_PATH. So it check /usr/local/lib for libpcap first.
Configure your application now.

Later on, you need to do
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
to use /usr/local/lib first in order to run your application.
For other softwares/application, do NOT set /usr/local/lib into your LD_LIBRARY_PATH.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Duncan RoeSoftware DeveloperCommented:
If you're putting stuff in /usr/local/lib (or anywhere else you choose) there's a much easier way in linux to make sure they get looked at: just edit /etc/ to include these directories. Then (re-)run ldconfig. It gets run on a reboot of course, but as root you can run it any time you want so there's no need to do one.
After the above, any program you run will pick up elf libraries from the newly added directories.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux OS Dev

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.