在Linux安裝討厭的Juniper VPN
1.完整移除Java:
Remove all the Java related packages (Sun, Oracle, OpenJDK, IcedTea plugins, GIJ):
1
2
3
| sudo apt-get update
apt-cache search java | awk '{print($1)}' | grep -E -e '^(ia32-)?(sun|oracle)-java' -e '^openjdk-' -e '^icedtea' -e '^(default|gcj)-j(re|dk)' -e '^gcj-(.*)-j(re|dk)' -e 'java-common' | xargs sudo apt-get -y remove
sudo apt-get -y autoremove
|
Purge config files:
1
| dpkg -l | grep ^rc | awk '{print($2)}' | xargs sudo apt-get -y purge
|
Remove Java config and cache directory:
1
| sudo bash -c 'ls -d /home/*/.java' | xargs sudo rm -rf
|
Remove manually installed JVMs:
1
| sudo rm -rf /usr/lib/jvm/*
|
Remove Java entries, if there is still any, from the alternatives:
1
| for g in ControlPanel java java_vm javaws jcontrol jexec keytool mozilla-javaplugin.so orbd pack200 policytool rmid rmiregistry servertool tnameserv unpack200 appletviewer apt extcheck HtmlConverter idlj jar jarsigner javac javadoc javah javap jconsole jdb jhat jinfo jmap jps jrunscript jsadebugd jstack jstat jstatd native2ascii rmic schemagen serialver wsgen wsimport xjc xulrunner-1.9-javaplugin.so; do sudo update-alternatives --remove-all $g; done
|
Search for possible remaining Java directories:
1
2
| sudo updatedb
sudo locate -b '\pack200'
|
2.移除Juniper_networks並重新安裝Java
Deleting ~/.juniper_networks:
1
| rm -rf .juniper_networks/^C
|
Download the Oracle JDK from PPA:
1
2
3
4
| sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
sudo apt-get install oracle-java7-set-default
|
Config java (Choose Oracle java)
1
2
3
| sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo update-alternatives --config javaws
|
Link browser to java applet
1
2
| mkdir ~/.mozilla/plugins/
ln -s /usr/lib/jvm/java-7-oracle/jre/lib/i386/libnpjp2.so ~/.mozilla/plugins/
|
3.打開firefox瀏覽器連VPN, 查看/var/log/sysloeg, 應該不會出現以下error了:
kernel: [ 1947.323900] ncsvc[2468]: segfault at 2 ip b75a3b8e sp bfa05320 error 4 in libc-2.15.so[b755e000+19f000]
Reference:
http://dougmunsinger.com/posts/juniper-vpn-on-linux.html
http://askubuntu.com/questions/84483/how-to-completely-uninstall-java
http://mad-scientist.us/juniper.html
http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html