You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pylucene-dev@lucene.apache.org by Herbert Roitblat <he...@orcatec.com> on 2010/07/03 15:09:34 UTC
libjava.so cannot open shared object file
I'm trying to build pylucene 2.9.2 in a virtual environment with openjdk
on 64 bit Ubuntu.
I get this from the make utility:
/home/administrator/src/orcatec/bin/python: libjava.so: cannot open
shared object file: No such file or directory
make: *** [compile] Error 1
setup.py has this line:
'linux2': '/usr/lib/jvm/java-6-openjdk',
That directory seems to have what it is supposed to have:
$ ls /usr/lib/jvm/java-6-openjdk
ASSEMBLY_EXCEPTION bin docs include jre lib man THIRD_PARTY_README
and libjava.so is found in /usr/lib/jvm/java-6-openjdk/jre/lib/amd64
I fixed this problem by adding a file to /etc/ld.so.conf.d that mentions
the paths explicitly.
I put this in file /etc/ld.so.conf.d/pylucene.conf (e.g., sudo nano
/etc/ld.so.conf.d/pylucene.conf)
#for building pylucene
/usr/lib/jvm/java-6-openjdk/jre/lib/amd64
/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server/
I then ran $sudo ldconfig
My question is why was this necessary? I built pylucene before with sun
java and did not need to do this.
Here is what I suspect is the answer:
I wanted to switch from sun java to open java. I'm bulding a virtual
machine and I wanted to have an easier installation method. So the
first thing I tried was to just load openjdk and try to run a copy of my
old pylucene against the different java. When that failed, set about
rebuilding pylucene with the openjdk.
I'm trying to make a repeatable process so that I (or a colleague) can
easily build virtual machines containing pylucene and my own
applications. So, is this step of building pylucene.conf necessary? Is
it a byproduct of my test?
Any comments would be appreciated.
Thanks,
Herb
Re: libjava.so cannot open shared object file
Posted by Andi Vajda <va...@apache.org>.
On Sat, 3 Jul 2010, Herbert Roitblat wrote:
> I'm trying to build pylucene 2.9.2 in a virtual environment with openjdk on
> 64 bit Ubuntu.
>
> I get this from the make utility:
>
> /home/administrator/src/orcatec/bin/python: libjava.so: cannot open shared
> object file: No such file or directory
> make: *** [compile] Error 1
>
> setup.py has this line:
>
>
> 'linux2': '/usr/lib/jvm/java-6-openjdk',
>
> That directory seems to have what it is supposed to have:
>
> $ ls /usr/lib/jvm/java-6-openjdk
> ASSEMBLY_EXCEPTION bin docs include jre lib man THIRD_PARTY_README
>
> and libjava.so is found in /usr/lib/jvm/java-6-openjdk/jre/lib/amd64
>
>
> I fixed this problem by adding a file to /etc/ld.so.conf.d that mentions the
> paths explicitly.
>
> I put this in file /etc/ld.so.conf.d/pylucene.conf (e.g., sudo nano
> /etc/ld.so.conf.d/pylucene.conf)
>
> #for building pylucene
> /usr/lib/jvm/java-6-openjdk/jre/lib/amd64
> /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server/
>
>
> I then ran $sudo ldconfig
>
> My question is why was this necessary? I built pylucene before with sun java
> and did not need to do this.
On Linux, this is not necessary provided the directories containing the JRE
.so files are correctly set when configuring and building jcc (in setup.py).
If they're not correct, then setting LD_LIBRARY_PATH or messing with
ldconfig becomes necessary.
Andi..
>
> Here is what I suspect is the answer:
> I wanted to switch from sun java to open java. I'm bulding a virtual machine
> and I wanted to have an easier installation method. So the first thing I
> tried was to just load openjdk and try to run a copy of my old pylucene
> against the different java. When that failed, set about rebuilding pylucene
> with the openjdk.
>
> I'm trying to make a repeatable process so that I (or a colleague) can easily
> build virtual machines containing pylucene and my own applications. So, is
> this step of building pylucene.conf necessary? Is it a byproduct of my test?
>
> Any comments would be appreciated.
>
> Thanks,
> Herb
>
>
>
>
>