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'm trying to run GCCG (a multiplatform implementation of a card game engine) on my Ubuntu 12.04 x86_64, but I always get the following error:

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

Of course I thought the library was missed and I tried to install using apt-get, but I realized it was already installed.

When i use

$ locate -i libjpeg

this is what i get:

/usr/lib/i386-linux-gnu/libjpeg.so.8
/usr/lib/i386-linux-gnu/libjpeg.so.8.0.2
/usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64/libjpeg.so
/usr/lib/x86_64-linux-gnu/libjpeg.so.62
/usr/lib/x86_64-linux-gnu/libjpeg.so.62.0.0
/usr/lib/x86_64-linux-gnu/libjpeg.so.8
/usr/lib/x86_64-linux-gnu/libjpeg.so.8.0.2
/usr/share/doc/libjpeg-turbo8
/usr/share/doc/libjpeg62
/usr/share/doc/libjpeg8
/usr/share/doc/libjpeg-turbo8/changelog.Debian.gz
/usr/share/doc/libjpeg-turbo8/copyright
/usr/share/doc/libjpeg62/README.gz
/usr/share/doc/libjpeg62/changelog.Debian.gz
/usr/share/doc/libjpeg62/copyright
/usr/share/doc/libjpeg8/changelog.Debian.gz
/usr/share/doc/libjpeg8/copyright
/usr/share/lintian/overrides/libjpeg-turbo8
/var/lib/dpkg/info/libjpeg-turbo8:amd64.list
/var/lib/dpkg/info/libjpeg-turbo8:amd64.md5sums
/var/lib/dpkg/info/libjpeg-turbo8:amd64.postinst
/var/lib/dpkg/info/libjpeg-turbo8:amd64.postrm
/var/lib/dpkg/info/libjpeg-turbo8:amd64.shlibs
/var/lib/dpkg/info/libjpeg-turbo8:amd64.symbols
/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/libjpeg62:amd64.list
/var/lib/dpkg/info/libjpeg62:amd64.md5sums
/var/lib/dpkg/info/libjpeg62:amd64.postinst
/var/lib/dpkg/info/libjpeg62:amd64.shlibs
/var/lib/dpkg/info/libjpeg8:amd64.list
/var/lib/dpkg/info/libjpeg8:amd64.md5sums
/var/lib/dpkg/info/libjpeg8:i386.list
/var/lib/dpkg/info/libjpeg8:i386.md5sums

Any idea of what is going bad?

Thanks in advance!

share|improve this question
add comment

2 Answers 2

up vote 6 down vote accepted

Is the executable you are trying to run a 32 bit executable, by any chance?

The locate output shows you have a 64-bit version of libjpeg.so.62 (in /usr/lib/x86_64-linux-gnu), but that can't be used if the executable is 32-bit.

You can determine what architecture a file is compiled for using the file command. For instance:

$ file /bin/ls
/bin/ls: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0x214a38d0db472db559f0dabf0ae97f82fea83e03, stripped

If it says you have a 32-bit executable, then that is your problem.

You can install the 32-bit version of the library in question using the following command:

sudo apt-get install libjpeg62:i386
share|improve this answer
    
Thanks A lot @James Henstridge, indeed the file was a 32 bit executable, but installing the libjpeg62:i386 worked like a charm. –  JLeonrp May 15 '12 at 19:03
add comment
cd /usr/lib/i386-linux-gnu
sudo ln -s libjpeg.so.8.0.2 libjpeg.so.62 

Now you will solve the problem

share|improve this answer
1  
This is really bad advice. The two libraries are not binary compatible (have different sonames), so you risk causing segfaults by doing this. –  James Henstridge Mar 21 at 0:00
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.