加载共享库时尝试运行 GCCG 时出错:libjpeg.so.62:无法打开共享对象文件

加载共享库时尝试运行 GCCG 时出错:libjpeg.so.62:无法打开共享对象文件

我试图在我的 Ubuntu 12.04 x86_64 上运行 GCCG(纸牌游戏引擎的多平台实现),但总是出现以下错误:

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

当然,我认为错过了这个库,并尝试使用 apt-get 进行安装,但我意识到它已经安装了。

当我使用

$ locate -i libjpeg

这是我得到的:

/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

知道什么地方出了问题吗?

提前致谢!

答案1

您尝试运行的可执行文件是否是 32 位可执行文件?

输出locate显示您有一个 64 位版本的libjpeg.so.62(in /usr/lib/x86_64-linux-gnu),但是如果可执行文件是 32 位的,则无法使用。

你可以使用以下命令确定文件是为哪种体系结构编译的file。例如:

$ 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

如果它说你有一个 32 位可执行文件,那么这就是你的问题。

您可以使用以下命令安装相关库的 32 位版本:

sudo apt-get install libjpeg62:i386

答案2

cd /usr/lib/i386-linux-gnu
sudo ln -s libjpeg.so.8.0.2 libjpeg.so.62 

现在你将解决问题

相关内容