LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-23-2006, 10:14 AM   #1
nate1
LQ Newbie
 
Registered: Apr 2004
Posts: 14

Rep: Reputation: 0
error while loading shared libraries


I've seen a number of posts on here and around the internet with this problem, but none of the solutions seem to help me.

I downloaded a program from the net, copied it to a different computer that had the proper fortran compiler, compiled it, and shipped it back to my computer along with all of the fortran libraries. I went into my home directory and added to the .bashrc file:

alias LD_LIBRARY_PATH="/pathtomylibraryhere/lib"

This worked before and I had the program up an running. However, I recently downloaded a more recent version of this same program, followed the same steps and I get this error message when I try to run the program:

./prog_gw.exe: error while loading shared libraries: libPEPCF90.so.3: cannot open shared object file: No such file or directory


Any helpful suggestions would be greatly appreciated. Thanks.

Nate
 
Old 02-23-2006, 04:51 PM   #2
jonaskoelker
Senior Member
 
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 47
These are the ideas for the `simple things' that might go wrong:

You can use ldd(1) to see which dynamic libraries an executable links against (although I can't see exactly what you'd use this for in your situation, you might find a use for it). Check that libPEPCF90.so.3 exists (using locate, find and/or ls). Check that ld(1) will actually link against it (i.e. check that LD_LIBRARY_PATH is properly set, with ($ echo $LD_LIBRARY_PATH)).

What I think might have happened is that the new versions depends on different libraries than the old one (use ldd to compare), and you don't have the correct libraries (however, I can't figure out how that can happen with a sane package manager ).

So, my question for you: what is the results of your findings?
 
Old 02-23-2006, 06:43 PM   #3
nate1
LQ Newbie
 
Registered: Apr 2004
Posts: 14

Original Poster
Rep: Reputation: 0
Thank you very much for your response.

Here is the fruit of your suggestions:

echo $(LD_LIBRARY_PATH)
bash: /disks/2/hoteling/intel/lib: is a directory

ldd() LD_LIBRARY_PATH
bash: syntax error near unexpected token `/disks/2/hoteling/intel/lib'

Maybe I didn't use the ldd() command correctly, since I'm not sure what the syntax error is, but it looks like LD_LIBRARY_PATH is pointing to the right place, since that is where the library is.


Here is another interesting tidbit that I just realized: When I compiled the program, on the other machine, I had to include the options -lPEPCF90 -lsvml, the first of which is suspiciously similar to the library that my machine is complaining about. Any ideas?

Nate
 
Old 02-24-2006, 01:48 AM   #4
jonaskoelker
Senior Member
 
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 47
Please do these instead:
Code:
$ echo $LD_LIBRARY_PATH
$ ldd myprogram
$ ls -l /disks/2/hoteling/intel/lib
$ locate libPEPCF90.so.3
"ldd(1)" means "the ldd program, which is documented in section one of the man pages".

the "-lNAME" options means "link with the NAME library". So, your program links with svml too (probably the filename is libsvml.so.<something>).

I hope this is explanatory enough.

Last edited by jonaskoelker; 02-24-2006 at 02:15 PM.
 
Old 02-24-2006, 09:56 AM   #5
nate1
LQ Newbie
 
Registered: Apr 2004
Posts: 14

Original Poster
Rep: Reputation: 0
ok...

$ echo $(LD_LIBRARY_PATH)
bash: /disks/2/hoteling/intel/lib: is a directory

$ ldd prog_gw.exe
libPEPCF90.so.3 => not found
libm.so.6 => /lib/tls/libm.so.6 (0x40026000)
libcxa.so.3 => not found
libc.so.6 => /lib/tls/libc.so.6 (0x40048000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

$ ls -l /disks/2/hoteling/intel/lib
all of the libraries in this directory are listed (lots of them)

$ locate libPEPCF90.so.3
/disks/2/hoteling/intel/lib/libPEPCF90.so.3



I might add that the libcxa.so.3, which also says "not found" above is also in the /..../intel/lib directory. So, it looks to me like LD_LIBRARY_PATH is pointing to the right place, but for some reason it's not finding the libraries there??

Thanks again.

Nate
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
error while loading shared libraries: libstdc++.so.5: cannot open shared object file: Franziss Linux - Newbie 10 06-28-2010 06:47 AM
Urgent !!! rpm: error while loading shared libraries: libelf.so.1: cannot open shared tinaa Linux - Software 5 12-02-2008 04:19 PM
error while loading shared libraries: libdb-4.1.so: cannot open shared object file putquery8581 Linux - Software 1 10-01-2004 08:03 AM
mplayer: error while loading shared libraries: libdvdread.so.3: cannot open shared ob Bruce Hill Slackware 6 12-11-2003 09:34 AM
linux init error in loading shared shared libraries akaran Linux - Software 1 05-28-2003 05:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration