Get a Free iPhone 4 from Xpango - click here

Wednesday, August 25, 2010

libXp.so.6: cannot open shared object file: No such file or directory

Last weekend i was trying to install Oracle 10g Release2 on Fedora 13 on a friends machine.
After installing the required packages and setting the kernel parameters,i was stuck with an error.
Below is the error:

[oracle@localhost database]$ ./runInstaller
Starting Oracle Universal Installer...


Checking installer requirements...


Checking operating system version: must be redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1 or asianux-2
                                      Passed
All installer requirements met.


Preparing to launch Oracle Universal Installer from /tmp/OraInstall2010-08-25_03-00-34PM. Please wait ...[oracle@localhost database]$ Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/OraInstall2010-08-25_03-00-34PM/jre/1.4.2/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at sun.security.action.LoadLibraryAction.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.NativeLibLoader.loadLibraries(Unknown Source)
at sun.awt.DebugHelper.<clinit>(Unknown Source)
at java.awt.Component.<clinit>(Unknown Source)

The error was due to "libXp.so.6"  which cannot be find in /usr/lib.

To fix this problem you need to install libXp package.

On this machine i used "yum install libXp" command to install this package.

Or you can search for libXp package according to your linux flavour and version.

After successful installation of this package you will find libXp.so.6 in /usr/lib.

Now the installer should run without any problem..

Thursday, August 19, 2010

Steps to Uninstall Java in Linux

There are two ways to uninstall Java. Please use the method that you used when you installed Java. For example, if you used RPM to install Java, then use the RPM uninstallation method.

RPM Package:

If the Java Development Kit was installed using RPM we can check it using ‘rpm -qa | grep jdk’. If this command shows any JDK version then you can easily remove the rpm package using
‘rpm –erase <javapackagename>‘

example:
Login as super user:su
rpm -qa |grep jdk

RPM reports package.
Unistall Java using :
rpm -e <jdk version>

Self Extracting File:

If the JDK was installed using self extraction zip file then we can directly remove the JDK folder using ‘rm -rf ‘

example:
In my box jdk is installed using selfextracting file and path is:
/usr/share/java-1.6.0/jdk1.6.0_13.

There is a way to find the java version we currently using.
Login as super user:su

update-alternatives --config java
It will show the java versions installed and currently used version.
You can select the version you need.

After locating jdk folder,remove the folder to uninstall.
In my case:

rm -rf /usr/share/java1.6.0/jdk1.6.0_13


If you are going to reinstall Java, you don't need to uninstall Java Plug-in. Just use the -f option for ln when creating a new symbolic link.
Example: ln -f /usr/lib/mozilla/plugins/libjavaplugin_oji.so

But in case you want to completely remove java,remove the symbolic link from mozilla plugin.

Login as super user:su

rm /usr/lib/mozilla/plugins/libjavaplugin_oji.so.