Sabtu, 01 Oktober 2016

CARA INSTALL ORACLE JAVA JRE 8U77 (JRE-8U77-LINUX-X64.RPM) DI OPENSUSE LEAP 42.1 64 BIT

Untuk menginstall Oracle Java JRE 8 Update 77 di OpenSuse Leap 42.1 memerlukan sedikit perjuangan. Berikut langkah-langkahnya:
1. Download paket RPM Oracle JRE 8 Update 77 di sini
2. Jalankan terminal lalu install dengan perintah:
sudo rpm -ivh jre-8u77-linux-x64.rpmroot's password:

Preparing...                          ################################# [100%]
Updating / installing...
  1:jre1.8.0_77-1.8.0_77-fcs         ################################# [100%]
Unpacking JAR files...
       plugin.jar...
       javaws.jar...
       deploy.jar...
       rt.jar...
       jsse.jar...
       charsets.jar...
       localedata.jar...
       jfxrt.jar...
update-alternatives: error: alternative pack200 can't be slave of java: it is a slave of javac
warning: %post(jre1.8.0_77-1.8.0_77-fcs.i586) scriptlet failed, exit status 2




3. Lakukan simbolik links
sudo ln -s /usr/sbin/update-alternatives /usr/sbin/alternatives

4. Install lagi dengan perintah tanpa mempedulikan dependensi
sudo rpm -ivh jre-8u77-linux-x64.rpm --nodeps 
Preparing...                          ################################# [100%]
       package jre1.8.0_77-1.8.0_77-fcs.i586 is already installed



5. Hilangkan plugin icedtea-web
sudo zypper rm icedtea-web
Loading repository data...
Reading installed packages...
'icedtea-web' not found in package names. Trying capabilities.

Resolving package dependencies...

The following package is going to be REMOVED:
java-1_8_0-openjdk-plugin

1 package to remove.
After the operation, 2.0 MiB will be freed.
Continue? [y/n/? shows all options] (y): y
(1/1) Removing java-1_8_0-openjdk-plugin-1.6.1-1.2 ..........................................................................................................................[done]
Additional rpm output:
update-alternatives: warning: alternative /usr/lib64/java-1_8_0-openjdk-plugin/lib/IcedTeaPlugin.so (part of link group javaplugin) doesn't exist; removing from list of alternatives
update-alternatives: warning: /etc/alternatives/javaplugin is dangling; it will be updated with best choice

There are some running programs that might use files deleted by recent upgrade. You may wish to check and restart some of them. Run 'zypper ps -s' to list these programs.



6. Lakukan perintah berikut ini untuk mengupdate java defaultnya menjadi java 8
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/java/latest/bin/java" 1
sudo update-alternatives --set java /usr/java/latest/bin/java


7. Cari letak libnpjp2.so
rpm -ql $(rpm -qa | grep jre) | grep libnpjp2.so
/usr/java/jre1.8.0_77/lib/amd64/libnpjp2.so



8. Masukan lib tersebut ke plugin
plugin=$(rpm -ql $(rpm -qa | grep jre) | grep libnpjp2.so) && ln -svf "$plugin" /usr/java/jre1.8.0_77/lib/i386/libnpjp2.so

ln: ‘/usr/java/jre1.8.0_77/lib/amd64/libnpjp2.so’ and ‘/usr/java/jre1.8.0_77/lib/amd64/libnpjp2.so’ are the same file 

Semoga berguna

Sumber: https://en.opensuse.org/SDB:Installing_Java

Tidak ada komentar:

Posting Komentar