Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 31

Thread: Unable to install Oracle Java 8 OpenSUSE 13.2

  1. #11
    Join Date
    Jun 2008
    Location
    Delta Quadrant
    Posts
    1,441

    Default Re: Unable to install Oracle Java 8 OpenSUSE 13.2

    Gave it one more shot before I left.
    Reinstalled my VM clean.
    Ran rpm -ivh --nodeps --force jdk-8u40-linux-586.rpm

    Returns:

    /var/tmp/rpm-tmp.P7xuNl: line 862: /usr/sbin/alternatives: No such file or directory
    /var/tmp/rpm-tmp.P7xuNl: line 874: /usr/sbin/alternatives: No such file or directory
    warning: %post(jdk1.8.0_40-2000:1.8.0_40-fcs.i586) scriptlet failed, exit status 127

    next ran your script as:
    ./fixJDK8.sh

    Returns:
    update-alternatives: error: alternative javaws can't be slave of java: it is a slave of javaplugin

    Next run: update-alternatives --config java

    Returns:

    There are 2 choices for the alternative java (providing /usr/bin/java).


    Selection Path Priority Status
    ------------------------------------------------------------
    * 0 /usr/lib/jvm/jre-1.8.0-openjdk/bin/java 18040 auto mode
    1 /usr/lib/jvm/jre-1.7.0-openjdk/bin/java 17147 manual mode
    2 /usr/lib/jvm/jre-1.8.0-openjdk/bin/java 18040 manual mode


    Press enter to keep the current choice[*], or type selection number:

    No Oracle/Sun Java choice.

  2. #12
    Join Date
    May 2012
    Location
    Finland
    Posts
    2,004

    Default Re: Unable to install Oracle Java 8 OpenSUSE 13.2

    Quote Originally Posted by GofBorg View Post
    No Oracle/Sun Java choice.
    You ignored when I said you should get rid of openjdk files, meaning they need to be uninstalled. It's because it doesn't include the -devel files in my little fix script, I ran out of time and had to leave so it only included the jre files in the update alternatives.

    The Oracle's RPM is designed for Fedora/RHEL so it uses their alternatives script.
    .: miuku #suse @ irc.freenode.net
    :: miuku@opensuse.org

    .: h​ttps://download.opensuse.org/repositories/home:/Miuku/

  3. #13

    Default Re: Unable to install Oracle Java 8 OpenSUSE 13.2

    Don't know if this will help, but while messing around with my Java installation today, I ran into similar problems. I found this set of instructions on some Chinese blog.
    Code:
    Download unzip JDK 7, giving 777 permission to use update-alternatives to manage multiple JDK:
    sudo zypper install update-alternatives
    sudo /usr/sbin/update-alternatives --install /usr/bin/java java /home/li/jdk1.7.0/bin/java 1065
    sudo /usr/sbin/update-alternatives --install /usr/bin/javac javac /home/li/jdk1.7.0/bin/javac 1065
    sudo /usr/sbin/ update-alternatives --install /usr/bin/jar jar /home/li/jdk1.7.0/bin/jar 1065
    sudo /usr/sbin/update-alternatives --install /usr/bin/ javaws javaws /home/li/jdk1.7.0/bin/javaws 1065
    
    Set the default JDK, enter a number to select:
    sudo /usr/sbin/update-alternatives --config java
    sudo /usr/sbin/update-alternatives --config javac
    
    Set the environment variable:
    vi ~/.bashrc
    In the penultimate line to:
    export JAVA_HOME=/home/li/jdk1.7.0
    
    Save and then run:
    source ~/.bashrc
    I was installing just JRE so I didn't need the javac, jar and javaws commands. I altered the commands to point to the appropriate locations where I had Java installed.

    However, I still had some issues due to the non-standard location of my install, so I ended up dumping it and downloaded the one here:
    http://software.opensuse.org/package/java-1_8_0-sun

    which seemed to handle the update-alternatives business. But I still had to set up the $JAVA_HOME and $PATH variables to point to the selected Java install.

    Once I got all that working, my jEdit text editor which is a Java app runs fine from the command line but doesn't run from the KDE menu entry. I've got a post elsewhere on that problem.

    Hope this helps.

  4. #14
    Join Date
    Jun 2008
    Location
    Delta Quadrant
    Posts
    1,441

    Default Re: Unable to install Oracle Java 8 OpenSUSE 13.2

    Quote Originally Posted by Miuku View Post
    You ignored when I said you should get rid of openjdk files, meaning they need to be uninstalled. It's because it doesn't include the -devel files in my little fix script, I ran out of time and had to leave so it only included the jre files in the update alternatives.

    The Oracle's RPM is designed for Fedora/RHEL so it uses their alternatives script.
    Nope, didn't ignore it. When you install Tomcat from the repos it forces installation of openJDK.
    I'll see if I can work around that.

  5. #15

    Default Re: Unable to install Oracle Java 8 OpenSUSE 13.2 (Solved)

    Here is how I just installed 8u40 on 13.2:
    1. Don't use the rpm but the tgz (jre-8u40-linux-x64.tar.gz) and untar it, e.g. to /usr/java (creates /usr/java/jre1.8.0_40/)
    2. Apply the std update-alternatives procedure, i.e.
      /usr/sbin/update-alternatives --install "/usr/bin/java" "java" "/usr/java/jre1.8.0_40/bin/java" 40
      /usr/sbin/update-alternatives --install "/usr/lib/browser-plugins/javaplugin.so" "javaplugin" "/usr/java/jre1.8.0_40/lib/amd64/libnpjp2.so" 40
      /usr/sbin/update-alternatives --config java
      /usr/sbin/update-alternatives --config javaplugin
    3. Finally, update symlink to plugin in appropriate user dir:
      cd .mozilla/plugins/
      rm libnpjp2.so
      ln -s /usr/java/jre1.8.0_40/lib/amd64/libnpjp2.so libnpjp2.so

    Worked fine for me.
    Regards Nick

  6. #16
    Join Date
    Jun 2008
    Location
    Germany
    Posts
    153

    Default Re: Unable to install Oracle Java 8 OpenSUSE 13.2

    Try this one:
    https://sites.google.com/site/easyli...a-for-opensuse

    Always works for me, just be aware that the instructions are not yet for the latest java version, instead of jre1.8.0_31 you already download jre1.8.0_40

  7. #17

    Question Re: Unable to install Oracle Java 8 OpenSUSE 13.2

    I'm seeing this same issue in SLES 11 SP3.

    Does anyone know what the fix is to install the rpm?

    Mostly commenting for subscription.

  8. #18
    Join Date
    Jun 2008
    Location
    Delta Quadrant
    Posts
    1,441

    Default Re: Unable to install Oracle Java 8 OpenSUSE 13.2 (Solved)

    Thanks for that. I have it installed at this point using the package
    from: http://software.opensuse.org/package/java-1_8_0-sun

    First I de-installed openJDK 7 and 8 which are installed by default.
    After de-installation I went back and marked the OpenJDK packages as 'Taboo Never Install' and
    set Sun Java to 'Protected'. I was then able to install Tomcat without it overwriting
    the JDK.

  9. #19

    Default Re: Unable to install Oracle Java 8 OpenSUSE 13.2

    Quote Originally Posted by avindra View Post
    I'm seeing this same issue in SLES 11 SP3.

    Does anyone know what the fix is to install the rpm?

    Mostly commenting for subscription.
    Here is what I did on a SUSE 13.1 machine to make a rpm I installed
    on SLES 11 SP3

    use rpmrebuild
    N.B. Make sure you are not root
    set your favorite editor e.g.
    setenv EDITOR xemacs
    or
    EDITOR=xemacs;export EDITOR

    rpmrebuild -e -p jdk-8u40-linux-x64.rpm

    wait it takes time to unpack everything.
    before the editor opens

    replace all alternatives with update-alternatives

    save and exit the editor and wait because
    it takes time to repack everything.

    answer y when it asks if you want to continue

    it should output where the rpm was saved to
    e.g.
    /usr/people/<your username>/rpmbuild/RPMS/x86_64/jdk1.8.0_40-1.8.0_40-fcs.x86_64.rpm
    Last edited by rjfleck; 06-Mar-2015 at 17:03. Reason: grmmer

  10. #20
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    10,952
    Blog Entries
    2

    Default Re: Unable to install Oracle Java 8 OpenSUSE 13.2

    Some observations (and recommendations)

    Looks like someone has cleaned up the SDB Java page since I looked at it (it was getting very cluttered).

    I see that someone has also added some new content for Oracle SE 8.
    I'll take a close look at the new content to see if I can do the same for it that I did for Oracle SE 7 (create a few quick scripts) that not only fix the current situation that openJDK must be uninstalled (because like the original instructions for Oracle SE 7 point to the same binary name for both Oracle and openJDK causing a conflict).

    If it's not obvious, the current SDB Java has these sections...
    "Java Runtime Environment Install using Oracle's RPM"
    Install Oracle JRE only (questionable value, not likely what a User would want)

    "Java Development Kit installation using Oracle's RPM"
    Install Oracle using the RPM using the RPM command (I would rather use the zypper command instead).

    "Procedure with development kit included (JDK)"
    Instead of using the RPM, this uses the tar file. Also, references Oracle SE 7 so if you wanted to try this with Oracle SE 8, you'd have to modify. If you intend to install Oracle SE 7, you'd do better just to run my scripts which does everything in a few seconds
    https://github.com/putztzu/openSUSE_Oracle_Java_Install

    "Procedure with runtime environment only (JRE)"
    This seems to be a tar version of the first section

    Based on what I see in the current SDB, until I create some updated scripts for Oracle SE 8 (if possible)
    - If Oracle SE 7 is sufficient for your needs, I still recommend my scripts which installs Oracle SE 7 side by side with openJDK. It's fast, and proven to work. All parts of the JDK are installed, although you may still have further work to do to enable and access the JDK parts.
    - If you want to install Oracle SE 8, only a JRE package can be found at software.opensuse.org. You can take your chances googling "opensuse java-1_8_0-sun-devel" for JDK packages
    - If you want to follow the SDB, in general the RPM instructions should be simpler than the TAR instructions but require close inspection before I can fully endorse.

    I hope to be able to post some Oracle SE 8 scripts within the next week, but don't hold me to it...

    TSU

Page 2 of 4 FirstFirst 1234 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
  •