[Zope-dev] Error by using libraries with an external method
Juliette Colmant
jcolmant@yahoo.fr
Mon, 24 Jun 2002 23:37:43 +0200 (CEST)
--0-13533708-1024954663=:44520
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Leonardo Rochael Almeida <leo@hiper.com.br> a écrit :
On Fri, 2002-06-21 at 17:25, Juliette Colmant wrote:
> > > [...]
> > > Error Type: ImportError
> > > Error Value: ./test.so: cannot open shared object
> > > file: No such file or directory
>
> --- Leonardo Rochael Almeida
> > You probably need to put your library in the
> > PYTHONPATH of Zope. The
> > usual place is
> > /lib/python2.1/site-packages
> >
> > Putting it in the Extesions directory, so that it
> > can be imported by
> > external methods, doesn't seem to work, even if you
> > put Extensions in
> > the PYTHONPATH, at least in my experience.
>
> I've tried to put the module and the librarie I use in
> the directory you gave me but I have still the same
> error.
> Actually, I have a module that use a library. Zope has
> no problem about the module. The problem is about the
> library...
> If you have an other idea?
I'm assuming that you mean the *module* is an extension library (i.e. a
.so file that is imported by your python code) and the *library* is
another .so that is needed by that module. In this case, the module must
be in the PYTHONPATH just as I mentioned, but the library must be in
your machine dynamic linker path. Take a look at the ld.so man page
("man ld.so") and, if your machine runs Linux, at the file
/etc/ld.so.conf and the ldconfig man page ("man ldconfig"). You may need
to configure the LD_LIBRARY_PATH environment variable.
Cheers, Leo
ps: when replying to help posts, please also reply to the list, not just
the original poster. Actually, it's better if you just reply to the
list, as the original poster will already receive the message.
--
Ideas don't stay in some minds very long because they don't like
solitary confinement.
Hy Leo,
I tried what you told me about the ld.so and ldconfig, but it doesn't work nether...
I have still the same error!
Juliette.
---------------------------------
Yahoo! Mail -- Une adresse @yahoo.fr gratuite et en français !
--0-13533708-1024954663=:44520
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
<P>
<P> <B><I>Leonardo Rochael Almeida <leo@hiper.com.br></I></B> a écrit :
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">
<P><BR>On Fri, 2002-06-21 at 17:25, Juliette Colmant wrote:<BR>> > > [...]<BR>> > > Error Type: ImportError<BR>> > > Error Value: ./test.so: cannot open shared object<BR>> > > file: No such file or directory<BR>> <BR>> --- Leonardo Rochael Almeida <LEO@HIPER.COM.BR><BR>> > You probably need to put your library in the<BR>> > PYTHONPATH of Zope. The<BR>> > usual place is<BR>> > <ZOPE-ROOT>/lib/python2.1/site-packages<BR>> > <BR>> > Putting it in the Extesions directory, so that it<BR>> > can be imported by<BR>> > external methods, doesn't seem to work, even if you<BR>> > put Extensions in<BR>> > the PYTHONPATH, at least in my experience.<BR>> <BR>> I've tried to put the module and the librarie I use in<BR>> the directory you gave me but I have still the same<BR>> error.<BR>> Actually, I have a module that use a library. Zope has<BR>> no problem about the module. The problem is about the<BR>> library...<BR>> If you have an other idea?<BR><BR>I'm assuming that you mean the *module* is an extension library (i.e. a<BR>.so file that is imported by your python code) and the *library* is<BR>another .so that is needed by that module. In this case, the module must<BR>be in the PYTHONPATH just as I mentioned, but the library must be in<BR>your machine dynamic linker path. Take a look at the ld.so man page<BR>("man ld.so") and, if your machine runs Linux, at the file<BR>/etc/ld.so.conf and the ldconfig man page ("man ldconfig"). You may need<BR>to configure the LD_LIBRARY_PATH environment variable.<BR><BR>Cheers, Leo<BR><BR>ps: when replying to help posts, please also reply to the list, not just<BR>the original poster. Actually, it's better if you just reply to the<BR>list, as the original poster will already receive the message.<BR><BR>-- <BR>Ideas don't stay in some minds very long because they don't like<BR>solitary confinement.<BR></P>
<P>Hy Leo,</P>
<P>I tried what you told me about the ld.so and ldconfig, but it doesn't work nether...</P>
<P>I have still the same error!</P>
<P>Juliette.</P>
<P> </P></BLOCKQUOTE><p><br><hr size=1><a href="http://fr.mail.yahoo.com">Yahoo! Mail</a> -- Une adresse @yahoo.fr gratuite et en français !<br>
--0-13533708-1024954663=:44520--