Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I just built libjpeg and installed it. I'm trying to my program, it successfully builds, but shows this message when executed:

error while loading shared libraries: libjpeg.so.9: cannot open shared object file: No such file or directory

locate -i libjpeg shows this:

/usr/lib/gthumb/extensions/libjpeg_utils.so
/usr/lib/i386-linux-gnu/libjpeg.so.8
/usr/lib/i386-linux-gnu/libjpeg.so.8.0.2
/usr/share/doc/libjpeg-progs
/usr/share/doc/libjpeg-turbo-progs
/usr/share/doc/libjpeg-turbo8
/usr/share/doc/libjpeg8
/usr/share/doc/libjpeg-progs/changelog.Debian.gz
/usr/share/doc/libjpeg-progs/copyright
/usr/share/doc/libjpeg-turbo-progs/changelog.Debian.gz
/usr/share/doc/libjpeg-turbo-progs/copyright
/usr/share/doc/libjpeg-turbo8/changelog.Debian.gz
/usr/share/doc/libjpeg-turbo8/copyright
/usr/share/doc/libjpeg8/changelog.Debian.gz
/usr/share/doc/libjpeg8/copyright
/usr/share/lintian/overrides/libjpeg-turbo8
/var/lib/dpkg/info/libjpeg-progs.list
/var/lib/dpkg/info/libjpeg-progs.md5sums
/var/lib/dpkg/info/libjpeg-turbo-progs.list
/var/lib/dpkg/info/libjpeg-turbo-progs.md5sums
/var/lib/dpkg/info/libjpeg-turbo8:i386.list
/var/lib/dpkg/info/libjpeg-turbo8:i386.md5sums
/var/lib/dpkg/info/libjpeg-turbo8:i386.postinst
/var/lib/dpkg/info/libjpeg-turbo8:i386.postrm
/var/lib/dpkg/info/libjpeg-turbo8:i386.shlibs
/var/lib/dpkg/info/libjpeg-turbo8:i386.symbols
/var/lib/dpkg/info/libjpeg8:i386.list
/var/lib/dpkg/info/libjpeg8:i386.md5sums

By the way, I'm using Sublime Text 2 with the following build system:

{  
    "cmd": ["g++", "$file", "-o", "$file_base_name", "-I/usr/local/include", "-L/usr/local/lib", "-ljpeg"],
    "working_dir": "${file_path}",
    "selector": "source.c++",  
    "windows": {  
       "cmd": ["cl", "/Fo${file_path}", "/O2", "$file"]  
    }  
}

I saw this link but it wasn't helpful: Error trying to run GCCG while loading shared libraries: libjpeg.so.62: cannot open shared object file

Can someone please help?

share|improve this question
add comment

1 Answer

Solved it by installing the package libjpeg62:

sudo apt-get install libjpeg62

If anyone has something to say, please do!

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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