Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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


Any idea of what is going bad?

Thanks in advance!

share|improve this question
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 (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
cd /usr/lib/i386-linux-gnu
sudo ln -s 

Now you will solve the problem

share|improve this answer
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 '14 at 0:00

Your Answer


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.