Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
error loading shared libraries - java, nptl, glibc [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
zidour
Tux's lil' helper
Tux's lil' helper


Joined: 29 Apr 2004
Posts: 103

PostPosted: Wed May 31, 2006 4:59 pm    Post subject: error loading shared libraries - java, nptl, glibc [solved] Reply with quote

I am trying to install hdfview - a tool for inspecting hdf5 files. The whole software is written in Java.
However, when running the installer, I get a lot of errors:
Code:

# sh ./hdfview_install_linux_novm.bin
Preparing to install...
Extracting the installation resources from the installer archive...
Configuring the installer for this system's environment...
awk: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
dirname: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/bin/ls: error while loading shared libraries: librt.so.1: cannot open shared object file: No such file or directory
basename: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
dirname: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
basename: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
hostname: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory

Launching installer...

grep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/opt/blackdown-jdk-1.4.2.03/jre/bin/java: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

All the specified libraries are installed in /lib or /usr/lib.

I was trying to search the forum if someone has a similar problem and indeed, I've found some, see
https://forums.gentoo.org/viewtopic-t-202429.html and
https://forums.gentoo.org/viewtopic-t-371006.html
What is strange is that all those posts are very old (2004 or so) and none of them contains a kind of systematic solution (at least I did not see any).

There are two things that these problems have in common:
1) There is always java involved,
2) There is always nptl + nptlonly version of glibc installed

I tried to read all the related posts and it seemed to me that installing a "-nptl" or at least "-nptlonly" version of glibc would solve the problem. The problem is that the recent version of glibc is "nptl nptlonly", so there is no way how to build it without nptl.

Any hints? Thanks...


Last edited by zidour on Fri Jun 02, 2006 10:09 am; edited 1 time in total
Back to top
View user's profile Send private message
cerebus_k
Apprentice
Apprentice


Joined: 20 Jun 2003
Posts: 173
Location: Flower Mound, Texas

PostPosted: Thu Jun 01, 2006 7:50 pm    Post subject: Reply with quote

I'm having the same problem trying to install Jini on my machine by doing a

Code:

sh jini2_1.bin


and getting the awk/libdl.so.2 error (among others) that confuses the script.

Did a bit of google research and found this:

http://www.jalbum.net/forum/thread.jspa?forumID=1&threadID=6034&messageID=46472#46472

and

http://www.linuxquestions.org/questions/showthread.php?t=370056

which mentioned problems with exporting LD_ASSUME_KERNEL=2.2.5

I poked around in the Jini install script and found that if I did an

Code:
export LAX_DEBUG=1


it would display debugging output, which allowed me to narrow down where the script was when it issued these errors. This allowed me to find that it was issuing this combination:

Code:

export LD_ASSUME_KERNEL=2.2.5
java -version 2>&1 | awk


so I tried entering that on the command line and sure enough the error msg appeared. The Jini install script has this around where the error was occuring:

Code:

   debugOut "checking for NPTL + JVM vulernability..."
   #check libc to see if it was compiled with NPTL


and

Code:

      # I have to set this before I check the JVM version, a-cuz
      # the call will hang, if it -is- vulnerable!


so I am assuming this is a common thing for scripts to do to find out if there is a problem with NPTL and the current version of the systems JVM and I suspect it's used by a lot of other Java application install scripts too.

Unfortunatly for me the solution of installing this is not as simple as commenting out the code in the script that causes the problem as it then tells me the install script is corrupt. This is probably due to the script checking it's own size/checksum or something similar. I will perservere but it's not going to be pretty.

Hope this helps,

bill
_________________
Gettin old isn't for wimps
Back to top
View user's profile Send private message
zidour
Tux's lil' helper
Tux's lil' helper


Joined: 29 Apr 2004
Posts: 103

PostPosted: Fri Jun 02, 2006 10:00 am    Post subject: Reply with quote

Thanks for your links. There is a workaround mentioned at http://www.linuxquestions.org/questions/showthread.php?t=370056.
For me, editing the file in vi did not work. It resulted in the install file being corrupted as in your case. However, the workaround mentioned above worked.
More specifically,
Code:

cp Install.bin Install.bak
cat Install.bak | sed "s/export LD_ASSUME_KERNEL/#xport LD_ASSUME_KERNEL/" > Install.bin
rm Install.bak

did the trick for me.

We probably cannot edit the file in an ordinary text editor, we need a hexadecimal one.
Back to top
View user's profile Send private message
palantir
Tux's lil' helper
Tux's lil' helper


Joined: 28 Nov 2003
Posts: 142
Location: Trento, Italia

PostPosted: Fri Dec 15, 2006 1:01 pm    Post subject: Reply with quote

Great tip, thanks. I had the same problem with MagicDraw installation (which uses InstallAnywhere).
/me loves Gentoo forums
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum