Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/lucene/__init__.py", line 2, in <module>
import os, _lucene
ImportError: libjvm.so: cannot open shared object file: No such file or directory
After installing pylucene I should be able to run
python -c "import lucene"
but it returns the error
Traceback (most recent call last): python2. 7/dist- packages/ lucene/ __init_ _.py", line 2, in <module>
File "<string>", line 1, in <module>
File "/usr/lib/
import os, _lucene
ImportError: libjvm.so: cannot open shared object file: No such file or directory
ldd shows libjvm.so not in ld's path:
root@ubuntu- precise: /usr/lib/ python2. 7/dist- packages/ lucene# ldd _lucene.so f000) x86_64- linux-gnu/ libstdc+ +.so.6 (0x00007f7cbf11 9000) 64-linux- gnu/libgcc_ s.so.1 (0x00007f7cbef0 3000) 64-linux- gnu/libpthread. so.0 (0x00007f7cbece 6000) 64-linux- gnu/libc. so.6 (0x00007f7cbe92 7000) 64-linux- gnu/libm. so.6 (0x00007f7cbe62 a000) ld-linux- x86-64. so.2 (0x00007f7cbfc1 3000)
linux-vdso.so.1 => (0x00007fff1b9f
libjvm.so => not found
libstdc++.so.6 => /usr/lib/
libgcc_s.so.1 => /lib/x86_
libpthread.so.0 => /lib/x86_
libc.so.6 => /lib/x86_
libm.so.6 => /lib/x86_
/lib64/
After learning that pylucene stores a path during the build process, I searched _lucene.so and found these paths:
/usr/ lib/jvm/ java-6- openjdk/ jre/lib/ amd64:/ usr/jvm
The first path doesn't exist on Precise, but it does on Lucid.
ls /usr/lib/jvm/ 6.0-openjdk- amd64 java-6- openjdk- amd64 java-6- openjdk- common java-7- openjdk- amd64
java-1.
After running jvm/java- 6-openjdk- amd64/ /usr/lib/ jvm/java- 6-openjdk
ln -s /usr/lib/
ldconfig
I can now import the lucene module.
I think pylucene just needs to be rebuilt on Precise so that _lucene.so stores the proper path