Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
Hi All, I am unable to install the jre RPM which i downloaded fron SUN website. This is the error i get: (Using CentOS) # rpm -Uvh jre-6u24-linux-i586.rpm Preparing... ########################################### ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2010
    Posts
    34

    Question CentOS : Unable to install java


    Hi All,
    I am unable to install the jre RPM which i downloaded fron SUN website.
    This is the error i get: (Using CentOS)
    # rpm -Uvh jre-6u24-linux-i586.rpm
    Preparing... ########################################### [100%]
    package jre-1.6.0_24-fcs is already installed

    This package i saw isn't present.

    Please help me.
    Thanks in advance
    kingsmasher1

  2. #2
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    What is the output of this
    Code:
    rpm -qa jre
    ?
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  3. #3
    Just Joined!
    Join Date
    Dec 2010
    Posts
    34
    Quote Originally Posted by devils casper View Post
    What is the output of this
    Code:
    rpm -qa jre
    ?
    This is the output:
    Code:
    [root@dhcppc0 ~]# rpm -qa jre*
    jre-1.6.0_24-fcs

  4. $spacer_open
    $spacer_close
  5. #4
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    jre has been installed.
    This package i saw isn't present.
    How and where did you check?
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  6. #5
    Just Joined!
    Join Date
    Dec 2010
    Posts
    34
    Yes, it shows jre is installed, but when i do "java -version", it gives error saying "Not found".

    I am not able to install new jre too.

    Please help me if you can.

  7. #6
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    probably java directory wasn't added to path variable

    I'm not sure where the jre is installed to, but I imagine that its somewhere in /opt

    use rpm -ql jre so you can see where it is installed

    you will want to set JAVA_HOME environment variable to the base directory, and then add JAVA_HOME/bin to path

    i would just edit user .bashrc file to do this, example of /opt/java:
    Code:
    export JAVA_HOME=/opt/java
    export PATH=${JAVA_HOME}/bin:$PATH

  8. #7
    Just Joined!
    Join Date
    Dec 2010
    Posts
    34

    Unhappy

    Quote Originally Posted by coopstah13 View Post
    probably java directory wasn't added to path variable

    I'm not sure where the jre is installed to, but I imagine that its somewhere in /opt

    use rpm -ql jre so you can see where it is installed

    you will want to set JAVA_HOME environment variable to the base directory, and then add JAVA_HOME/bin to path

    i would just edit user .bashrc file to do this, example of /opt/java:
    Code:
    export JAVA_HOME=/opt/java
    export PATH=${JAVA_HOME}/bin:$PATH
    The strange thing is that running "rpm -ql jre" shows a lot of things like:
    Code:
    /etc
    /etc/.java
    /etc/.java/.systemPrefs
    /etc/.java/.systemPrefs/.system.lock
    /etc/.java/.systemPrefs/.systemRootModFile
    /etc/init.d/jexec
    /usr
    /usr/java
    /usr/java/jre1.6.0_24
    /usr/java/jre1.6.0_24/COPYRIGHT
    /usr/java/jre1.6.0_24/README
    /usr/java/jre1.6.0_24/THIRDPARTYLICENSEREADME.txt
    /usr/java/jre1.6.0_24/Welcome.html
    /usr/java/jre1.6.0_24/bin
    /usr/java/jre1.6.0_24/bin/ControlPanel
    /usr/java/jre1.6.0_24/bin/java
    /usr/java/jre1.6.0_24/bin/java_vm
    /usr/java/jre1.6.0_24/bin/javaws
    /usr/java/jre1.6.0_24/bin/jcontrol
    /usr/java/jre1.6.0_24/bin/keytool
    /usr/java/jre1.6.0_24/bin/orbd
    But when i do:
    Code:
    cd /usr/java/ [Enter]
    bash: cd: /usr/java: No such file or directory
    Please help me. Why is it showing, no such file or directory, where "rpm -ql" shows it is present?
    Please help me.

  9. #8
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Post the output of this
    Code:
    ls -ln /etc/.java
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  10. #9
    Just Joined!
    Join Date
    Dec 2010
    Posts
    34
    Quote Originally Posted by devils casper View Post
    Post the output of this
    Code:
    ls -ln /etc/.java
    Here is the output:
    Code:
    [root@dhcppc0 ~]# ls -ln /etc/java
    total 36
    -rw-r--r--  1 0 0 13537 Dec 15  2004 font.properties
    -rw-r--r--  1 0 0   493 May  3  2007 java.conf
    -rw-r--r--  1 0 0    50 May  3  2007 jpackage-release

  11. #10
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    i don't think RPM file was properly installed, just uninstall RPM and then reinstall

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •