Library's version

Posted on 2004-11-03
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?

Question by:kwseow
    LVL 2

    Expert Comment

    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").
    LVL 9

    Expert Comment

    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.

    Author Comment

    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?

    LVL 38

    Accepted Solution

    > 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.

    LVL 34

    Assisted Solution

    by:Duncan Roe
    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.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
    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…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    761 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

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now