Can't find libawt.so
See original GitHub issueHi.
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:
- Created 7 years ago
- Comments:14 (6 by maintainers)
Top GitHub Comments
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.
@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).