导入错误:libjpeg.so.7:无法打开共享对象文件:没有这样的文件或目录

时间:2013-11-21 22:54:38

标签: enthought

我在Redhat上安装学术Enthought Cannopy。当我输入

import _imaging

打印出错误消息:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: libjpeg.so.7: cannot open shared object file: No such file or directory

但是在Enthough网站上,据说libjpeg已被收录。

Canopy的版本是1.1.0。终端中env的输出为:

MANPATH=/opt/torque/man:/usr/NX/bin:/usr/kerberos/bin:/usr/java/latest/bin:/share/apps/anaconda/bin:/usr/local/bin:/bin:/usr/bin:/opt/bio/ncbi/bin:/opt/bio/mpiblast/bin/:/opt/bio/hmmer/bin:/opt/bio/EMBOSS/bin:/opt/bio/clustalw/bin:/opt/bio/tcoffee/bin:/opt/bio/phylip/exe:/opt/bio/mrbayes:/opt/bio/fasta:/opt/bio/glimmer/bin://opt/bio/glimmer/scripts:/opt/bio/gromacs/bin:/opt/bio/gmap/bin:/opt/bio/tigr/bin:/opt/bio/autodocksuite/bin:/opt/ganglia/bin:/opt/ganglia/sbin:/opt/openmpi/bin/:/opt/maui/bin:/opt/torque/bin:/opt/torque/sbin
BIOROLL=/opt/bio

TERM=xterm-256color
SHELL=/bin/bash
HISTSIZE=1000

SSH_CLIENT=141.211.38.9 36340 22
PHENIX_INSTALLER_DATE=300920111225
ROCKSROOT=/opt/rocks/share/devel
PHENIX_MVERSION=redhat-e5.4
PHENIX=/share/apps/phenix-1.7.2-869
SSH_TTY=/dev/pts/8
ANT_HOME=/opt/rocks
USER=xqding
PHENIX_MTYPE=intel-linux-2.6-x86_64
LS_COLORS=
ROCKS_ROOT=/opt/rocks
VIRTUAL_ENV=/home/xq/Enthought/Canopy_64bit/User
MAIL=/var/spool/mail/xq
PATH=/home/xqding/Enthought/Canopy_64bit/User/bin:/home/xq/Enthought/Canopy_64bit/User/bin:/home/xq/apps/bin:/share/apps/phenix-1.7.2-869/build/intel-linux-2.6-x86_64/bin:/library/yzhang/bin/HMMER:/usr/bin:/bin:/sbin:/usr/sbin:/mnt/sysimage/bin:/mnt/sysimage/usr/bin:/mnt/sysimage/usr/sbin:/mnt/sysimage/sbin:/mnt/sysimage/usr/X11R6/bin:/tmp/updates/rocks/bin:/tmp/updates/usr/sbin:/tmp/updates/sbin:/tmp/updates/usr/bin:/opt/rocks/bin:/opt/rocks/sbin:/opt/sun-ct/bin:/home/xq/apps/cd-hit-v4.6.1-2012-08-27:/home/xq/apps/samtools-0.1.19:/library/blast/bin:/home/xq/apps/cd-hit-v4.6-2012-04-25:/home/xq/apps/dssp-2.2.1:/home/xqding/apps/dssp-ver2hor:/home/xq/bin:/home/xq/apps/python/2.7/bin
NXDIR=/usr/NX
INPUTRC=/etc/inputrc
PWD=/home/xqding/appsrc
JAVA_HOME=/usr/java/latest
EDITOR=emacsclient
LANG=en_US.iso885915
PHENIX_USE_MTYPE=intel-linux-2.6-x86_64
PHENIX_ENVIRONMENT=1
BLASTDB=/home/xqding/bio/ncbi/db
PHENIX_VERSION=1.7.2
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
PHENIX_RELEASE_TAG=869
SHLVL=1
HOME=/home/xq
ROLLSROOT=/opt/rocks/share/devel/src/roll
LOGNAME=xqding
CVS_RSH=ssh
LESSOPEN=|/usr/bin/lesspipe.sh %s
BLASTMAT=/opt/bio/ncbi/data
G_BROKEN_FILENAMES=1
_=/usr/bin/env

我下载了libjpeg版本7的源代码并将其安装在Redhat计算机上。然后将库目录添加到export LD_LIBRARY_PATH=directory of libjpeg。然后问题就解决了。我很感激我从这里得到的帮助。所以我只是添加解决方案。

1 个答案:

答案 0 :(得分:2)

与RedHat一起安装的libjpeg版本可能已经过时(你在RedHat 5上吗?)。尝试打开RedHat包管理器并查找“jpeg”。安装更高版本的库可能会解决此问题。