?
Solved

Library's version

Posted on 2004-11-03
7
Medium Priority
?
187 Views
Last Modified: 2010-04-21
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?

0
Comment
Question by:kwseow
5 Comments
 
LVL 2

Expert Comment

by:Matt_Avery
ID: 12482373
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").
0
 
LVL 9

Expert Comment

by:gtkfreak
ID: 12485538
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.
0
 

Author Comment

by:kwseow
ID: 12489818
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?

0
 
LVL 38

Accepted Solution

by:
wesly_chen earned 1000 total points
ID: 12501817
> rpm -U --nodeps --force
--nodeps is not recommended, especially for the library.

First , please download
http://download.fedoralegacy.org/redhat/9/updates/i386/libpcap-0.7.2-7.9.3.legacy.i386.rpm
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)
Then
# 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.

Wesly
0
 
LVL 35

Assisted Solution

by:Duncan Roe
Duncan Roe earned 1000 total points
ID: 12503859
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/ld.so.conf 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.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Suggested Courses

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question