Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   Redirecting ./configure --prefix (http://www.velocityreviews.com/forums/t339204-redirecting-configure-prefix.html)

Dan 12-14-2004 02:15 AM

Redirecting ./configure --prefix
 
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

Dave Reed 12-14-2004 03:15 AM

Re: Redirecting ./configure --prefix
 
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



Dan 12-14-2004 03:58 AM

Re: Redirecting ./configure --prefix
 
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

Mark Asbach 12-14-2004 08:15 AM

Re: Redirecting ./configure --prefix
 
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


All times are GMT. The time now is 10:08 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57