Sheetal Akhud
Sheetal Akhud

Reputation: 67

java.lang.UnsatisfiedLinkError: /usr/local/openjdk-8/jre/lib/amd64/libawt_xawt.so: libXrender.so.1:

I am running my automation test project in Gitlab pipeline. I am getting the exception as:

java.lang.UnsatisfiedLinkError: /usr/local/openjdk-8/jre/lib/amd64/libawt_xawt.so: libXrender.so.1: cannot open shared object file: No such file or directory

I tried multiple solution for installing and updating the packages but no luck Tried solutions :

Could you please suggest?

Upvotes: 1

Views: 10226

Answers (4)

Alejandro
Alejandro

Reputation: 194

I'm having the exact same issue, and I this fixed it:

apt-get install libxrender1:i386 libxtst6:i386 libxi6:i386

Upvotes: 0

Georg Gbess
Georg Gbess

Reputation: 21

You are probably encountering this error because you do not have the libawt_xawt.so package in your /usr/local/openjdk-8/jre/lib/amd64/ directory.

To fix the problem, follow these steps:

1- Update the package index:

sudo apt-get update

2- Install openjdk-11-jre deb package:

sudo apt-get install openjdk-11-jre

source here.

Upvotes: 0

a.t.
a.t.

Reputation: 2749

After running java -jar languagetool.jar I received the same error as your question mentions:

Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/java-11-openjdk-amd64/lib/libawt_xawt.so

Based on this similar question, I tried:

sudo apt-get install -y openjdk-6-jre

Which returned:

Reading package lists... Done Building dependency tree Reading state information... Done Package openjdk-6-jre is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: icedtea-netx

E: Package 'openjdk-6-jre' has no installation candidate

Hence, I tried:

sudo apt-get install -y icedtea-netx

And that resolved the error.

Upvotes: 2

Hack06
Hack06

Reputation: 1092

Are you trying to build the native lib (creating the .so file in the fly) or trying to make use of the pre-built version of it? In the first case, make sure your test-automation tool supports it; in the second case, make sure the presence of your lib file in the appropriate location.

Upvotes: 0

Related Questions