问题
I am getting the error below when running a java file that tries to open an ods file.
Exception in thread "main" java.lang.UnsatisfiedLinkError: /opt/software/jdk1.6.0_45/jre/lib/i386/xawt/libmawt.so: libXext.so.6: cannot open shared object file: No such file or directory at java.lang.ClassLoader$NativeL
I tried - 'yum install libXext'
but got the msg - already installed.
Any suggestions?
Answer:
do yum install libXstst.so.6 It installs and works fine
回答1:
In my case I needed to install additional libs.
yum install libXext.x86_64
yum install libXrender.x86_64
yum install libXtst.x86_64
回答2:
First of all you can try to use the following command:
yum search libXext
Following this search you will find that you need to install the following library: libXext.i686 (or most probabily libXext.i386). After this you can run:
sudo yum install libXext.i686
As a side note, I needed also to install the following libraries in order to make my java application to work properly: libXrender.i686 and libXtst.i686. I think that this issue is due to the fact that we are trying to user a java 32bit version on a 64bit OS.
回答3:
I think you may installed 32 bit jdk in 64 bit system.if your CentOs is 64 bit, and you installed 32 bit jdk. You will get that error when you run jar
you can check CentOs is 32 bit or 64 bit,enter command:
getconf LONG_BIT
If the CentOs is 64 bit, then you can remove the 32 bit jdk, and install a new one
回答4:
use file command to see if it is 32bit or 64 bit file /opt/software/jdk1.6.0_45/jre/lib/i386/xawt/libmawt.so its output should like:
ELF 32-bit LSB executable
then install corresponding lib for 32 bit:
sudo yum install libXext.i686
for 64 bit:
sudo yum install libXext
回答5:
For Arch I used pkgfile (which I installed with pacman) and then ran:
pkgfile --update
pkgfile libXtst.so.6
and it showed me extra/libxtst.
I installed with pacman and so far so good.
来源:https://stackoverflow.com/questions/29741518/error-libxext-so-6-cannot-open-shared-object-file-no-such-file-or-directory