天天看點

libIce.so.34: cannot open shared object file: No such file or directoryImportError at /

ImportError at /

libIce.so.34: cannot open shared object file: No such file or directory      
Request Method: GET
Request URL: http://127.0.0.1/
Django Version: 1.3
Exception Type: ImportError
Exception Value:
libIce.so.34: cannot open shared object file: No such file or directory      
Exception Location: /usr/local/lib/Ice-3.4.1/python/Ice.py in <module>, line 47
Python Executable: /usr/local/bin/python
Python Version: 2.6.6
Python Path:
['/usr/local/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg',
 '/usr/local/lib/python2.6/site-packages/MySQL_python-1.2.3-py2.6-linux-x86_64.egg',
 '/usr/local/lib/Ice-3.4.1/python',
 '/usr/local/lib/python26.zip',
 '/usr/local/lib/python2.6',
 '/usr/local/lib/python2.6/plat-linux2',
 '/usr/local/lib/python2.6/lib-tk',
 '/usr/local/lib/python2.6/lib-old',
 '/usr/local/lib/python2.6/lib-dynload',
 '/usr/local/lib/python2.6/site-packages',
 '/usr/local/lib/python2.6/site-packages/PIL',
 '/home/python/django']      
Server time: Fri, 3 Jun 2011 01:04:46 -0500

解決辦法:

http://www.zeroc.com/forums/help-center/5128-ice-3-4-x-php5-3-3-rhel4-cpanel.html

# cd $ICE_HOME/python

# ldd IcePy.so

        libIce.so.34 =>  not found

        libSlice.so.34 =>  not found

        libIceUtil.so.34 => not found

        libpthread.so.0 => /lib64/libpthread.so.0 (0x00002b6d72609000)

        librt.so.1 => /lib64/librt.so.1 (0x00002b6d72824000)

        libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00002b6d72a2d000)

        libm.so.6 => /lib64/libm.so.6 (0x00002b6d72d2e000)

        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00002b6d72fb1000)

        libc.so.6 => /lib64/libc.so.6 (0x00002b6d731bf000)

        libbz2.so.1 => /usr/lib64/libbz2.so.1 (0x00002b6d73517000)

        libdl.so.2 => /lib64/libdl.so.2 (0x00002b6d73727000)

        /lib64/ld-linux-x86-64.so.2 (0x0000003b44e00000)

# export LD_LIBRARY_PATH=$ICE_HOME/lib:$ICE_HOME/lib64:$LD_LIBRARY_PATH

原因:Ice是自己使用源碼編譯的,LD_LIBRARY_PATH指向ICE_HOME/lib,但是作業系統是Linux 64位,ICE_HOME/lib目錄是空的,所有的共享對象都在ICE_HOME/lib64。将LD_LIBRARY_PATH指向ICE_HOME/lib64 ,問題解決。