I have an binary program to run on ubuntu. It has shared object dependency. pmvs is the name of the program

   $ ldd pmvs
        linux-vdso.so.1 =>  (0x00007fff043c3000)
        libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007fa14dc9a000)
        libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007fa14d964000)
        libjpeg.so.62 => not found
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fa14d747000)
        liblapack.so.3 => not found
        libgsl.so.0 => not found
        libgslcblas.so.0 => not found
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fa14d449000)
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fa14d149000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fa14cf33000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fa14cb73000)
        libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007fa14c955000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fa14c751000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fa14dece000)
        libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007fa14c54d000)
        libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007fa14c347000)

It apparently cannot find libjpeg.so. However I am sure that it exist and is at : "/usr/lib/x86_64-linux-gnu/libjpeg.so". How to I set the linker path to include that location.

I have ubuntu 12.04


Installing an older version of libjpeg solved my problem

sudo apt-get install libjpeg62:i386
sudo apt-get install libjpeg62

Since other libraries are successfully being found in /usr/lib/x86_64-linux-gnu, your problem is not how to specify that location, but probably the version number of the installed library is not 62 like the program is looking for.

You have two choices, either find and install an old version of the missing library, or much easier and likely to succeed is to just add the missing library as a link to the version of the library installed.

Now Ubuntu 14.04 has libjpeg.so.8.0.2, so something is drastically different. However, I do have a /usr/lib/vmware-installer/2.1.0/lib/lib/libjpeg.so.62/libjpeg.so.62 on my 14.04 system, so maybe you have something similar (I have vmplayer installed). If the libjpeg.8.0.2 library does not work for the link, look around for something vmware install left around (the player is a free download if you need it).


In my case that apt-get didn't work , I did the following:

git clone https://github.com/LuaDist/libjpeg.git

and then:

make install

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.