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

5

22

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

Blower answered 20/4, 2015 at 7:20 Comment(3)
Similar problem was answered for Ubuntu - #17356363 Also, googling gives numerous results. Did you try any of them?Knawel
Possible duplicate of Can't find/install libXtst.so.6?Calia
For me only sudo apt-get install libxrender1:i386 libxtst6:i386 libxi6:i386 worked fineProsody
M
35

In my case I needed to install additional libs.

yum install libXext.x86_64
yum install libXrender.x86_64
yum install libXtst.x86_64
Mctyre answered 12/5, 2016 at 10:50 Comment(4)
Perfect answer. I was setting up an RHEL8 on AWS and had to install all 3 - sudo yum install libXext / sudo yum install libXrender / sudo yum install libXtst.Monarchal
what if I run it on serverless cloud, no access to the Linux os...Verbosity
Works wonders for PyCharm installation on RHEL7Acetabulum
I also needed sudo yum install libXft.x86_64.Ought
M
10

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.

Meghannmegiddo answered 4/12, 2015 at 16:29 Comment(0)
R
2

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

Rheinlander answered 12/6, 2016 at 2:0 Comment(0)
S
0
  1. 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

  2. then install corresponding lib for 32 bit:

    sudo yum install libXext.i686

    for 64 bit:

    sudo yum install libXext

Shape answered 14/7, 2016 at 14:38 Comment(0)
E
0

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.

Eddie answered 11/6, 2017 at 6:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.