Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Redirecting ./configure --prefix

Reply
Thread Tools

Redirecting ./configure --prefix

 
 
Dan
Guest
Posts: n/a
 
      12-14-2004
I suspect this isn't specifically a Python question, but I
encountered it with Python so I thought I'd ask here.

I'm running Linux (Fedora 2), and just downloaded the Python 2.4
kit. I did the following from my user account:
./configure --prefix=/some/private/dir --enable-shared
make
make test # all was okay
make install

Now, when I try to run this I get the following error:
python: error while loading shared libraries:
libpython2.4.so.1.0: cannot open shared object file: No such
file or directory

This library is in /some/private/dir/lib, but that directory is
not being searched.

So, I have these questions:
- Can I get Python to search /some/private/dir/lib for
library files?
- Will sys.path be okay? How can I make it okay?
- Is there anything else I need to worry about?

Any help would be appreciated.

Thanks,
Dan

--
dedded att verizon dott net
 
Reply With Quote
 
 
 
 
Dave Reed
Guest
Posts: n/a
 
      12-14-2004
On Monday 13 December 2004 21:15, Dan wrote:
> I suspect this isn't specifically a Python question, but I
> encountered it with Python so I thought I'd ask here.
>
> I'm running Linux (Fedora 2), and just downloaded the Python 2.4
> kit. I did the following from my user account:
> ./configure --prefix=/some/private/dir --enable-shared
> make
> make test # all was okay
> make install
>
> Now, when I try to run this I get the following error:
> python: error while loading shared libraries:
> libpython2.4.so.1.0: cannot open shared object file: No such
> file or directory
>
> This library is in /some/private/dir/lib, but that directory is
> not being searched.
>
> So, I have these questions:
> - Can I get Python to search /some/private/dir/lib for
> library files?
> - Will sys.path be okay? How can I make it okay?
> - Is there anything else I need to worry about?


I think you just need to this if your shell is bash (default shell in
FC2 I think)
LD_LIBRARY_PATH=/some/private/dir/lib; export LD_LIBRARY_PATH
or if you're using csh or tcsh
setenv LD_LIBRARY_PATH /some/private/dir/lib

If that works, you can put this in the appropriate dot file so you don't
have to retype them each time you login/create a new shell.

For bash I think it's ~/.bashrc or ~/.profile
and for csh it's ~/.cshrc and ~/.tcshrc for tcsh.

HTH,
Dave


 
Reply With Quote
 
 
 
 
Dan
Guest
Posts: n/a
 
      12-14-2004
Dave Reed wrote:
> LD_LIBRARY_PATH=/some/private/dir/lib; export LD_LIBRARY_PATH


LD_LIBRARY_PATH does the trick, and sys.path seems okay by default.
Thanks!

/Dan

--
dedded att verizon dott net
 
Reply With Quote
 
Mark Asbach
Guest
Posts: n/a
 
      12-14-2004
Hi Dan,

> > LD_LIBRARY_PATH=/some/private/dir/lib; export LD_LIBRARY_PATH

>
> LD_LIBRARY_PATH does the trick, and sys.path seems okay by default.
> Thanks!


If you are the admin of the machine and python is not the only package
installed in a non-standard directory, then editing the /etc/ld.so.conf
file might be the better option.

Have look at 'man ldconfig' and 'man ld.so'.

Yours,

Mark
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CCM41 - Displaying originator number when redirecting Tor-Ivar Kristoffersen Cisco 0 03-07-2006 10:56 PM
redirecting stderr and stdout Jon Landenburer Perl 1 05-13-2004 07:38 AM
Redirecting HTTP traffic based on host-header (or URL request) Tim Mavers Cisco 3 04-13-2004 06:31 PM
Redirecting a HTTP POST with CSS dmcknigh Cisco 0 10-18-2003 04:30 PM
Redirecting all WWW traffic CybrSage Cisco 7 07-19-2003 03:03 PM



Advertisments