wood burning stoves*
The moose likes Linux / UNIX and the fly likes JDK1.5 installation failed on ubuntu linux 11.10 server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "JDK1.5 installation failed on ubuntu linux 11.10 server" Watch "JDK1.5 installation failed on ubuntu linux 11.10 server" New topic
Author

JDK1.5 installation failed on ubuntu linux 11.10 server

Vinod Vijay
Ranch Hand

Joined: Sep 13, 2011
Posts: 137

Hi, I have never run java on linux. I'm running ubuntu server 11.10 on my laptop. I have just downloaded jdk-1_5_0_22-linux-i586.bin from Oracle site. During installation i have encountered following error:-

./jdk-1_5_0_22-linux-i586.bin: 424: ./install.sfx.4475: not found
cd: 751: can't cd to jdk1.5.0_22


Just for the information, I tried to install jdk using root login after giving chmod 755 permission first and then with chmod 777(full access to all) but nothing worked

I referred below link for this activity:-
linuxjournal

I'm a newbie. Please help me. Also just for my knowledge how can I see how many computing bits of linux OS I'm running like 32bit or 64bit, is there any unix command for that?
Thanks a lot in advance

Vinod Vijay Nair
Koen Aerts
Ranch Hand

Joined: Feb 07, 2012
Posts: 344

In what directory are you trying to execute the installer? You normally don't need to be root to install Java, unless you want to place it somewhere under /usr.

Use to see which UNIX kernel is running, it should give an indication whether it's the 32-bit (x86) or the 64-bit kernel.
Vinod Vijay
Ranch Hand

Joined: Sep 13, 2011
Posts: 137

Koen Aerts wrote:
Use to see which UNIX kernel is running, it should give an indication whether it's the 32-bit (x86) or the 64-bit kernel.

I got this after using uname -a
Linux ubuntu-nkvijay827 3.0.0-15-server #26-Ubuntu SMP Fri Jan 20 19:07:39 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
does it mean 64bit?

Koen Aerts wrote:
In what directory are you trying to execute the installer? You normally don't need to be root to install Java, unless you want to place it somewhere under /usr.

Yes, I'm trying to put under /usr/local that is why I used root

Any idea?
Koen Aerts
Ranch Hand

Joined: Feb 07, 2012
Posts: 344

I normally install and run Java as a regular (non-root) user, because all my development is done using regular user privileges; never as root. For instance put the Java installer in your user home dir (i.e. /home/user/) and execute it there as that user. Java files will be installed in the same directory. Once that is done, you can move that dir to where ever you want.
Koen Aerts
Ranch Hand

Joined: Feb 07, 2012
Posts: 344

Vinod Vijay wrote:I got this after using uname -a
Linux ubuntu-nkvijay827 3.0.0-15-server #26-Ubuntu SMP Fri Jan 20 19:07:39 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
does it mean 64bit?

Yes it does.
Vinod Vijay
Ranch Hand

Joined: Sep 13, 2011
Posts: 137

Koen Aerts wrote:I normally install and run Java as a regular (non-root) user, because all my development is done using regular user privileges; never as root. For instance put the Java installer in your user home dir (i.e. /home/user/) and execute it there as that user. Java files will be installed in the same directory. Once that is done, you can move that dir to where ever you want.


hard luck buddy...as you advised. I switch to normal user, that is myself. Created a new directory called jdk under my home i.e. /home/vijay827/jdk. Placed the jdk file there with full access to all and tried to execute but now it says command not found
Here is script from my terminal:-



Any idea?
Koen Aerts
Ranch Hand

Joined: Feb 07, 2012
Posts: 344

Instead of:
jdk-1_5_0_22-linux-i586.bin

do this:
./jdk-1_5_0_22-linux-i586.bin
Vinod Vijay
Ranch Hand

Joined: Sep 13, 2011
Posts: 137

Koen Aerts wrote:Instead of:
jdk-1_5_0_22-linux-i586.bin

do this:
./jdk-1_5_0_22-linux-i586.bin


Please see the outcome now:-


Is that because of no/less privileges which it needs to create its java directories or something else?
Koen Aerts
Ranch Hand

Joined: Feb 07, 2012
Posts: 344

I think it's related to the fact you're installing a 32-bit JDK on a 64-bit platform, which is fine, but you may need to install the ia32 Suite first.
Try this:
sudo apt-get install ia32-libs

Then re-run the JDK installer.

Alternatively, you can download and install the 64-bit JDK installer.
Vinod Vijay
Ranch Hand

Joined: Sep 13, 2011
Posts: 137

Koen Aerts wrote:I think it's related to the fact you're installing a 32-bit JDK on a 64-bit platform, which is fine, but you may need to install the ia32 Suite first.
Try this:
sudo apt-get install ia32-libs

Then re-run the installer.


Thanks buddy. I think it worked.
As suggested by you, I installed my linux package with ia32-libs and the re-installed jdk1.5.
See my script now :-




Like windows, I tried 'java' and 'javac -version' command to see where its properly done and to see its version but didn't work.

Koen may I know what do you do? Are you a linux geek or java developer?
Koen Aerts
Ranch Hand

Joined: Feb 07, 2012
Posts: 344

You need to update your PATH to include the jdk bin directory. You probably want to do this in your login script, such as .profile, .bashrc, etc, depending on which is your default shell (as specified in /etc/passwd). For instance if you installed the JDK in /myapps/jdk1.5.0_22 then you need to add the following to PATH: PATH=${PATH}:/myapps/jdk1.5.0_22/bin
Koen Aerts
Ranch Hand

Joined: Feb 07, 2012
Posts: 344

Vinod Vijay wrote:Koen may I know what do you do? Are you a linux geek or java developer?

All of the above, among many other things
Vinod Vijay
Ranch Hand

Joined: Sep 13, 2011
Posts: 137

Koen Aerts wrote:You need to update your PATH to include the jdk bin directory. You probably want to do this in your login script, such as .profile, .bashrc, etc, depending on which is your default shell (as specified in /etc/passwd). For instance if you installed the JDK in /myapps/jdk1.5.0_22 then you need to add the following to PATH: PATH=${PATH}:/myapps/jdk1.5.0_22/bin


I'm using BASH shell I think


Is that correct? I opened it in vi editor, edited and saved and finally try 'java' and'javac -version' but didn't work.
Vinod Vijay
Ranch Hand

Joined: Sep 13, 2011
Posts: 137

Koen Aerts wrote:
Vinod Vijay wrote:Koen may I know what do you do? Are you a linux geek or java developer?

All of the above, among many other things

Are you on facebook? Would like to add you as my technical friend there
Koen Aerts
Ranch Hand

Joined: Feb 07, 2012
Posts: 344

Vinod Vijay wrote:Is that correct? I opened it in vi editor, edited and saved and finally try 'java' and'javac -version' but didn't work.

You either need to re-logon to a new session (for instance open a new terminal window or tab, or "su - myusername" as yourself in the current session), or run the script manually. Then use the "env" command to check your PATH value, or enter echo $PATH.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDK1.5 installation failed on ubuntu linux 11.10 server
 
Similar Threads
Installation of Java in Linux
Trouble Installing JDK on a Netbook Running Ubuntu
java installation problem in ubuntu
problem installing java
Installation Guide (Tomcat on Linux)