Error thrown in update-alternatives

前端 未结 4 1338
猫巷女王i
猫巷女王i 2021-02-15 00:19

I am trying to install jdk for 32-bit OS. Followed the below steps,

  1. wget --no-cookies --header \"Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com\" http://down

相关标签:
4条回答
  • 2021-02-15 00:30

    Remove folder java from /usr/bin and try again

    0 讨论(0)
  • 2021-02-15 00:32

    if you need to install java in Ubuntu, you can try using following command and you will get oracle-java-installer in your synaptic package manager, click it and install it.

    sudo add-apt-repository ppa:webupd8team/java
    

    Else try following steps

     $ wget http://download.oracle.com/otn-pub/java/jdk/6u34-b04/jre-6u34-linux-i586.bin
     $ chmod u+x jre-6u34-linux-i586.bin
     $ ./jre-6u34-linux-i586.bin
     $ sudo mkdir -p /usr/lib/jvm
     $ sudo mv jre1.6.0_34 /usr/lib/jvm/
     $ sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jre1.6.0_34/bin/java" 1
     $ sudo update-alternatives --install "/usr/lib/mozilla/plugins/libjavaplugin.so" "mozilla-javaplugin.so" "/usr/lib/jvm/jre1.6.0_34/lib/i386/libnpjp2.so" 1
     $ sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jre1.6.0_34/bin/javaws" 1
    
    0 讨论(0)
  • 2021-02-15 00:39

    Instead of Step 4 : 4. mkdir -p /usr/lib/jvm /usr/bin/java /usr/bin/javac /usr/bin/javaws

    Just use

    $mkdir -p /usr/lib/jvm

    and make sure that you are moving the files to usr/lib/jvm , for that use

    $mv -v jre1.6.0_34 /usr/lib/jvm/

    so that you can see the details and after installation change the configuration of java and javaws by :

    $update-alternatives --config java

    select from the option similarly ,

    $update-alternatives --config javaws

    this should work if you have already another java installed

    0 讨论(0)
  • 2021-02-15 00:45

    The issue is that you have created a folder named "java" in /usr/bin . Remove the folder from /usr/bin and run the command again.

    0 讨论(0)
提交回复
热议问题