[PyGreSQL] Help with build on amd-64 linux
Ken Southerland
southerland at samsix.com
Tue Feb 21 19:53:43 EST 2006
On Tuesday 21 February 2006 3:03 pm, Daryl Tester wrote:
> Ken Southerland wrote:
> > I have an AMD 64-bit platform running SuSE Linux 10 and am having the
> > following problem using pygresql on it....
> >
> > ken at saturn> python -c "import _pg.so"
> > Traceback (most recent call last):
> > File "<string>", line 1, in ?
> > ImportError: libpq.so.4: cannot open shared object file: No such file or
> > directory
>
> Shouldn't you just be running "import _pg" (not _pg.so)?
Yeah, that's what I meant, but same problem anyway, it doesn't seem to matter
whether you include the extension or not. BUT --> see below!
>
> > So far I have tried adding the location of libpq.so.4 to my PYTHONPATH
> > and that didn't work.
>
> Shouldn't this be LD_LIBRARY_PATH or its 64 bit equivalent? (I'm not
> that familiar with the 64 bit environment).
>
Yes, duh, you were right. I guess I just didn't expect to have to set this as
I never did before. But then again this is the first time that I had to
compile postgres from source. Previously I could use the rpm's because I
could always find 32-bit rpms or pre-compiled libraries for the extensions
that I wanted and I guess the LD_LIBRARY_PATH (or an equivalent) was taken
care of automatically. This time I had to do it all myself due to lack of
64-bit support and thus now I have to add this to my profile manually as
well.
Anyway, it certainly works with the path to libpq.so in the LD_LIBRARY_PATH
variable.
Cheers!
Ken
More information about the PyGreSQL
mailing list