LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   identifying 32 bit libraries on a 64 bit linux (https://www.linuxquestions.org/questions/linux-newbie-8/identifying-32-bit-libraries-on-a-64-bit-linux-4175427821/)

econ8193 09-18-2012 09:58 AM

identifying 32 bit libraries on a 64 bit linux
 
Hello All, I have a software that installs with a 32 bit installation script. My problem seems to be that the script is unable to find a 32 bit JRE. Although it is installed and the path variables appear to be set the system does not see the location.
I am hypothesizing that the potentially the 32 bit libraries or binaries did not get installed as I am quite certain the OS installations were all default installs. Is there a way to verify that the OS does have the 32 bit binaries or libraries necessary for the 32 bit install script to run? Where might they exist and what common names might they have if any?

johnsfine 09-18-2012 10:01 AM

Quote:

Originally Posted by econ8193 (Post 4783286)
Is there a way to verify that the OS does have the 32 bit binaries or libraries necessary for the 32 bit install script to run? Where might they exist and what common names might they have if any?

Start by telling us what Linux distribution you have. Also what package manager do you know how to use?

The answer to your question is simple, but it depends on distribution, especially on whether it is a Redhat based distribution such as Fedora vs. a Debian based distribution such as Ubuntu.

econ8193 09-18-2012 10:10 AM

Red Hat Enterprise 5 64 bit
 
This is running on a virtual machine, however I do not believe that has any effect on the issue. I was also getting the same issues on Ubuntu 10 x64, and SUSE Linux Enterprise Server 11 x64.

econ8193 09-18-2012 10:13 AM

Not at all sure on pkg manager
 
Pretty green on the terminology as it might apply to Linux. What pkg manager might I recognize, I probably have not specifically or knowingly used one.

johnsfine 09-18-2012 10:18 AM

In Redhat based distributions (including SUSE), your native libraries are in various lib64 directories and your 32 bit compatibility libraries are in various lib directories.

In Debian based distributions (including Ubuntu), your native libraries are in various lib directories and your 32 bit compatibility libraries are in various lib32 directories.

Those directories include
/lib
/usr/lib
etc.

In each place replacing the "lib" part with "lib32" or "lib64" as appropriate.

On Red hat based distribution, the package manger I prefer is Yum.

johnsfine 09-18-2012 10:25 AM

Quote:

Originally Posted by econ8193 (Post 4783286)
the 32 bit binaries or libraries necessary for the 32 bit install script to run?

For an ordinary executable, you can get the list of .so files it needs using the ldd command. Then you can use the yum provides command to find out what package includes each missing .so file.

But an install script might be more complicated to diagnose. You may need to look into the details of what is going wrong in order to determine which missing .so file cause the failure.

econ8193 09-18-2012 10:50 AM

At this point I am most interested in the 32 libraries needed for installation and recognition of 32 bit java, if that makes sense. Although I have a 32 bit java installed (jre1.6.0_31) when I go to that installed directory /usr/java/jre1.6.0_31/bin and type java -version it is displaying the inherant 1.4.2 java installed with the OS which is not compatible with my install script.
I have tried setting the JAVA_HOME variable and path as an environment variable as well with no success recognizing the designated java.

johnsfine 09-18-2012 11:05 AM

Quote:

Originally Posted by econ8193 (Post 4783331)
when I go to that installed directory /usr/java/jre1.6.0_31/bin and type java -version it is displaying the inherant 1.4.2 java installed with the OS

For that experiment, you should have typed
Code:

./java -version
Without the ./ you are getting the default java regardless of your current directory.


Quote:

which is not compatible with my install script.
Once you verify that the java you want to use is able to run at all, I'm not sure how you make that install script use the desired java instead of the default java.

Changing PATH before running the script is one plausible method to get the desired java.

econ8193 09-18-2012 12:06 PM

Red Hat Enterprise 5 64 bit
 
Thanks for the clarification. the ./java -version does bring in the correct version of java.

I have had several suggestions, but I believe at this point I have tried to have the JAVA_HOME set to the /usr/java/jre1.6.0_31 folder and tried as well going to the bin folder as well Then exported the variable and did the same with PATH and then exporting the PATH as well.

I tried this in both the profile and the bashrc. Since I see the path redundantly when I do echo $PATH I guess I should only have it one of those files, but don't believe it will cause an issue (by the way this is pretty much a non critical machine that can be played with for QA purposes).

Yet in spite of the correct path showing for the JAVA_HOME and the $PATH showing a valid path. When I type which java it is showing a path of /usr/bin/java instead of the desired /usr/java/jre1.6.0_31.

I have also tried using the -is switch by doing the ./osasinstal.sh -is:javahome /usr/java/jre1.6.0_31 and still getting the ero message which tells me the command cannot find a suitable JRE.

so I am still looking at trying to understandand research how the system might be looking for the correct java and what I might be missing.

johnsfine 09-18-2012 01:00 PM

What exactly have you done to PATH?

After doing that to PATH, what do you get if you type
which java

suicidaleggroll 09-18-2012 01:12 PM

Please post the contents of PATH. Remember, the directories in PATH are in order. The first directory in the list is searched first, the last directory in the list is searched last. As soon as it finds the program it's looking for, it stops looking. So if you added your /usr/java/jre directory AFTER the /usr/bin directory, it will always find /usr/bin/java first, as it has no reason to keep looking.


All times are GMT -5. The time now is 07:09 AM.