472,983 Members | 2,360 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,983 software developers and data experts.

Error with Python 2.3 as a shared Library

Hi, perhaps some of you can help me...

I'm installing Python 2.3 (in Linux RedHat 8.0) and I need to build it
like a shared library, because I want to interact
Python with PostgreSQL. Following the README instructions, I try:

../configure --enable-shared --prefix=/whatever (I'm not root of my
system, so I can't use /usr/local/)
make
make install

it seems to be ok, without errors. And when I try :

/whatever/bin/python

it says:

whatever/bin/python error while loading shared libraries:
libpython2.3.so.1.0: cannot open shared object file: No such file or
directory

but this library (libpython2.3.so.1.0 ) is in the whatever/lib directory.

What's wrong? Is it something related to the path? How can I tell python
where the library is? Or is it not the problem?

Thanks.
Jul 18 '05 #1
1 2564
You need to add /whatever/lib to the path for searching .so files.
If you are root, normally you may edit /etc/ld.so.conf to add the path permanently.
If you are not root, you can set the environment variable LD_LIBRARY_PATH:

for sh: export LD_LIBRARY_PATH=/whatever/lib
for csh: setenv LD_LIBRARY_PATH /whatever/lib

or simply use the env command:

env LD_LIBRARY_PATH=/whatever/lib python

Note that this is nothing special to python but normal behaviour of Linux or Linux like operating systems including many Unices.

Regards,
Kiyo

"Francisco Miguel Montenegro Montes" <fm*@cca.iac.es> wrote in message news:ma*********************************@python.or g...
Hi, perhaps some of you can help me...

I'm installing Python 2.3 (in Linux RedHat 8.0) and I need to build it
like a shared library, because I want to interact
Python with PostgreSQL. Following the README instructions, I try:

./configure --enable-shared --prefix=/whatever (I'm not root of my
system, so I can't use /usr/local/)
make
make install

it seems to be ok, without errors. And when I try :

/whatever/bin/python

it says:

whatever/bin/python error while loading shared libraries:
libpython2.3.so.1.0: cannot open shared object file: No such file or
directory

but this library (libpython2.3.so.1.0 ) is in the whatever/lib directory.

What's wrong? Is it something related to the path? How can I tell python
where the library is? Or is it not the problem?

Thanks.

Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Douglass Turner | last post by:
Hi, Please release me from my own private hell. Platform: SuSE 8.1 I'm installing python 2.3 tarball as follows: ../configure --enable-shared make
7
by: Ixokai | last post by:
Hello all. :) I've been a long time Python fan, and have fairly recently (with the support of a coworker who surprised me by mentioning my pet language one day) convinced my company to begin the...
1
by: Ram | last post by:
Dear All I am very new to python . i would appreciate any help from you all on this problem which i am facing. I am trying to connect to postgres from python.for this i am using something like...
2
by: Dean | last post by:
I've been trying to make python a dynamic library. I downloaded Python 2.4.3 Final from the Python web site and I cannot get it to create the library. I've tried using the directive: ...
113
by: John Nagle | last post by:
The major complaint I have about Python is that the packages which connect it to other software components all seem to have serious problems. As long as you don't need to talk to anything outside...
4
by: Arnaud Delobelle | last post by:
Hi fellow python enthusiasts. Having recently acquired a MacBook Pro (Intel Core 2 Duo) which comes with python2.5, I have been installing some modules that I need (PIL, psycopg2, PyXML ...). ...
2
by: akhilesh.noida | last post by:
I am trying to compile glibc-2.5 for ARM based board. But I am getting errors while configuring it. Please check and give your inputs for resolving this. configure command : $...
6
by: Geon. | last post by:
hi everyone! when i install pysqlite i meet bellow error. ( use easy_install and source code building same problem ) ld: Can't find library for -lpython2.5 what mean this message? and what...
20
by: timotoole | last post by:
Hi all, On a (sun) webserver that I use, there is python 2.5.1 installed. I'd like to use sqlite3 with this, however sqlite3 is not installed on the webserver. If I were able to compile sqlite...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.