Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: libXext.so.6: cannot open shared object file: No such file or directory [duplicate]

Tags:

java

centos

ods

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

like image 549
Green Avatar asked Apr 20 '15 07:04

Green


3 Answers

In my case I needed to install additional libs.

yum install libXext.x86_64
yum install libXrender.x86_64
yum install libXtst.x86_64
like image 192
user3018906 Avatar answered Oct 09 '22 02:10

user3018906


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.

like image 28
sanelli Avatar answered Oct 09 '22 04:10

sanelli


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

like image 32
liudabao Avatar answered Oct 09 '22 03:10

liudabao