LinuxQuestions.org
Visit Jeremy's Blog.
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 08-08-2008, 06:52 AM   #1
noshankus
LQ Newbie
 
Registered: Aug 2008
Posts: 2

Rep: Reputation: 0
Install jdk in different location


Hi All,


I hope you can help me.

I'm trying to install jdk-6u6-linux-i586-rpm.bin on FC8. Normally it would be easy, but the root partition set up as read only (this cannot be changed).

What I would like to do is install above to /usr/local/java which is a writeable partition.

When I attempt to execute the bin file, it unpacks successfully, but then each package complains:

---------------------------------------------------------------------
error: unpacking of archive failed on file /usr: cpio: chown failed - Read-only file system
---------------------------------------------------------------------
or
---------------------------------------------------------------------
error: unpacking of archive failed on file /opt/sun/javadb: cpio: mkdir failed - No such file or directory
---------------------------------------------------------------------

Understandably, as the only writable location is under /usr/local, /etc and /var.

So, when I attempt to install the rpm manually, I get:

---------------------------------------------------------------------
[root@host /usr/local]# rpm -ivh --prefix=/usr/local/java jdk-6u6-linux-i586.rpm
Preparing... ########################################### [100%]
1:jdk ########################################### [100%]
error: unpacking of archive failed on file /usr: cpio: chown failed - Read-only file system
---------------------------------------------------------------------
or
---------------------------------------------------------------------
[root@host /usr/local]# rpm -ivh --relocate /usr=/usr/local jdk-6u6-linux-i586.rpm
Preparing... ########################################### [100%]
1:jdk ########################################### [100%]
Error: unpack200 - command could not be found.

Please refer to the Troubleshooting section of theInstallation Instructions on the download page.
---------------------------------------------------------------------

I figure this is because unpack200 is now under /usr/local/java/jdk../bin/unpack200 (confirmed to exist) instead of /usr/java/jdk.../bin/unpack200

Any ideas how I could let the rpm finish it's installation?? As if I run java -version I get:

---------------------------------------------------------------------
[root@host bin]# ./java -version
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object
---------------------------------------------------------------------

which I guess implies that the installation (unpacking??) hasn't completed.


Best regards,
No
 
Old 08-08-2008, 08:37 AM   #2
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 64
I think if you get the .bin file, you could install java anywhere you want. Just move the file to /usr/local/java and run the installer from there.

However, the question is, why is the root partition read only and can't be changed? Are you the root-user/admin on that machine? Is this your machine? Because if it is not, you should really need to ask your admin to install it for you. It is the admins job to install program after all, especially if you can't access part of the system to do it properly. Now, if you are actually not allowed to install applications, then we should really not help you to "hack into it"
 
Old 08-11-2008, 03:13 AM   #3
noshankus
LQ Newbie
 
Registered: Aug 2008
Posts: 2

Original Poster
Rep: Reputation: 0
Hi,

thanks, you're correct! I didn't think of that. Obviously thinking too much about the rpm to consider anything else. It works perfectly, thanks for the help.

Also, to help ease your conscience, the reason why the root partition is read only is that it's a bunch of blade servers and the same root partition is mounted across them all, saving space on the storage unit. Makes sense, but when it comes to using history or adding to known_hosts files (when as root), it's a pain.

Thanks again!
 
Old 08-11-2008, 01:47 PM   #4
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 64
Thumbs up

Quote:
Originally Posted by noshankus View Post
Hi,

thanks, you're correct! I didn't think of that. Obviously thinking too much about the rpm to consider anything else. It works perfectly, thanks for the help.

Also, to help ease your conscience, the reason why the root partition is read only is that it's a bunch of blade servers and the same root partition is mounted across them all, saving space on the storage unit. Makes sense, but when it comes to using history or adding to known_hosts files (when as root), it's a pain.

Thanks again!
Hi there noshankus. Thanks for the reply. I wish more would do that saying "it worked" or "it didn't". Also thanks for explaining why the root was read-only. That is kinda unusual for workstations I guess

Oh, and before I forget (again), welcome to LQ.org
 
  


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
JDK Install fails with install.sfx.#### No such file during installation. weibullguy Linux From Scratch 13 04-14-2012 10:54 PM
How to install JDK on fedora 8? rIcKy RoCk$ Linux - Newbie 2 02-28-2008 06:37 AM
How to install JDK and NetBeans? ~Linux_user~ Linux - Software 9 10-23-2007 01:30 PM
help to install jdk Carunkumar Ubuntu 11 12-25-2006 01:22 AM
i can't seem to install jdk 1.5.bin jadewarrior Ubuntu 2 09-28-2006 05:29 PM


All times are GMT -5. The time now is 07:56 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