help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] Always running time error : " error while loading share


From: Guanyao Huang
Subject: Re: [Help-glpk] Always running time error : " error while loading shared libraries: libglpk.so.0:"
Date: Tue, 23 Feb 2010 17:44:37 -0800

Actually my LD_LIBRARY_PATH is correct.

Now I run:
sudo make clean
 sudo ./configure --disable-shared
sudo make install

I change Makefile to:
g++ -lglpk -o TestLP TestLP.o BasicFunction.o CIDR.o
(are you sure there this makefile is correct? No other options?)

Still the same error:
address@hidden TestLP]$ ./TestLP
./TestLP: error while loading shared libraries: libglpk.so.0: cannot
open shared object file: No such file or directory


On Tue, Feb 23, 2010 at 5:19 PM, Andrew Makhorin <address@hidden> wrote:
>> Actually I already make install but I didnt post in the email.
>> OK.
>> Now:
>> sudo ./configure --prefix /usr
>> sudo make install prefix=/usr
>
>> Then make check works.
>> However, still there is a running time error for my program:
>> address@hidden TestLP]$ ./TestLP
>> ./TestLP: error while loading shared libraries: libglpk.so.0: cannot
>> open shared object file: No such file or directory
>
>> If I dont specify the prefix /usr but let it to be /usr/local/, there
>> is still the same error.
>
>> As I said, global variables are already defined as:
>> declare -x LD_LIBRARY_PATH="/usr/lib"
>> declare -x LD_RUN_PATH="/usr/lib"
>> declare -x LIBDIR="/usr/lib"
>
>> I strongly suspect that it is a problem of my Makefile for my own
>> program.
>
> The following sequence works for me (Debian GNU/Linux Etch):
>
> $ cd glpk-4.43
> $ ./configure
> $ make
> $ make check
> $ make install
> $ cd ..
> $ cp glpk-4.43/examples/sample.c sample.c
> $ gcc sample.c -lglpk
> $ export LD_LIBRARY_PATH="/usr/local/lib"
> $ ./a.out
>
> If LD_LIBRARY_PATH is not correctly set, running a.out causes the
> error you mentioned, i.e. "libglpk.so.0: cannot open shared object
> file: No such file or directory".
>
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]