question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't find libawt.so

See original GitHub issue

Hi.

I’ve been trying to run my application with honest-profiler agent recently, but I constantly get the following error during the JVM initialization:

Error occurred during initialization of VM Could not find agent library /home/maseev/tools/other/honest-profiler/liblagent.so in absolute path, with error: libawt.so: cannot open shared object file: No such file or directory

At first, I thought that the problem was in the libawt.so library itself, because it didn’t exist. But then I run the find shell command:

maseev@evilmachine:~$ find /home/maseev/tools/lang/jdk1.8.0_92/ | grep "libawt.so"
/home/maseev/tools/lang/jdk1.8.0_92/jre/lib/amd64/libawt.so

My JAVA_HOME environment variable points to the same folder where the libawt.so library is located:

maseev@evilmachine:~$ $JAVA_HOME
bash: /home/maseev/tools/lang/jdk1.8.0_92: Is a directory

I even added another environment variable how it was suggested in this issue.

maseev@evilmachine:~$ $LD_LIBRARY_PATH
bash: /home/maseev/tools/lang/jdk1.8.0_92/jre/lib/amd64/: Is a directory

But it didn’t help at all.

My OS description:

Linux evilmachine 3.13.0-91-generic #138-Ubuntu SMP Fri Jun 24 17:00:34 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Am I missing something? Are there any additional steps I have to perform in order to run honest-profiler?

Thanks.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
CodingInTheUKcommented, Mar 15, 2019

A solution I found to work generally may not work in this case is worth a try, at the worst it will make no difference, at best it will fix the issue you have.

Find the path you want to the link applying to (/usr/lib/ as below is common, but may not show in your properties output, adjust this part to reflect one that is shown by the following command, if there is one that has java in the path you may use that for sake of keeping things together but /usr/lib would work just as well if available.) $ java -XshowSettings:properties

Find the location of any existing libjawt.so and use its path in the place of <path> $ locate libjawt.so

make the link. $ sudo ln -s <path>/libjawt.so /usr/lib/libjawt.so

Run your application again, should resolve the dependency.

This was mine under *Ubuntu18.04 with openjdk 11 installed but yours may be different, just “locate” it and you should be set.

With this there is no need to add anything to the environment or bashrc as its already pulled in.

0reactions
ikavaliocommented, Jan 9, 2017

@RichardWarburton, no problem at all. I couldn’t reproduce the problem on any machine/platform available to me (both OS X and Linux, clang++ and gcc).

Read more comments on GitHub >

github_iconTop Results From Across the Web

libXext.so.6: cannot open shared object file: No such file or ...
apt-get install libxrender1:i386 libxtst6:i386 libxi6:i386. helped me get this resolved. I have installed in a 64 bit system also i386.
Read more >
Which package for libawt.so - narkive
Hi, I am running opera 9.52, there is an error "ERROR: ld.so: object 'libawt.so' from LD_PRELOAD cannot be preloaded: ignored". I could not...
Read more >
Java can't find library - Ask Fedora
I upgraded from F32 to F33 yesterday. Today one of my programs is not working. The error is: Failed to execute runnable (java.lang....
Read more >
support for libawt.so on 64 bit machine RHEL — oracle-tech
I have installed the jdk1.4.2_08 on 64 bit version of RHEL In one java application which is exporting some data in PDF.
Read more >
Exception java.lang.UnsatisfiedLinkError when trying to open ...
Run this to find out which ones, then install them. $ ldd /usr/lib/jvm/java-11-openjdk-amd64/lib/libawt_xawt.so.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found