Linux 找不到/安装 libXtst.so.6?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/17355863/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Can't find/install libXtst.so.6?
提问by Tropical_Peach
I'm running Ubuntu 12.10 and I'm trying to install Netbeans 7.1(or later) I have the .sh file, but it won't install, the error appears here:
我正在运行 Ubuntu 12.10 并且我正在尝试安装 Netbeans 7.1(或更高版本)我有 .sh 文件,但它不会安装,错误出现在这里:
[2013-06-27 19:11:28.918]: at org.netbeans.installer.Installer.main(Installer.java:81)
[2013-06-27 19:11:28.918]: An error occured while initializing the NetBeans IDE installer UI.
[2013-06-27 19:11:28.918]: Most probably the running JVM is not compatible with the current platform.
[2013-06-27 19:11:28.919]: See FAQ at http://wiki.netbeans.org/FaqUnableToPrepareBundledJdk for more information.
[2013-06-27 19:11:28.919]: /usr/local/java/jre1.7.0_25/lib/i386/xawt/libmawt.so: libXtst.so.6: cannot open shared object file: No such file or directory
[2013-06-27 19:11:28.919]:
[2013-06-27 19:11:28.919]: Exception:
[2013-06-27 19:11:28.919]: java.lang.UnsatisfiedLinkError:
[2013-06-27 19:11:28.919]: /usr/local/java/jre1.7.0_25/lib/i386/xawt/libmawt.so: libXtst.so.6: cannot open shared object file: No such file or directory
[2013-06-27 19:11:28.919]:
[2013-06-27 19:11:28.919]: You can get more details about the issue in the installer log file:
[2013-06-27 19:11:28.919]: /root/.nbi/log/20130627191128.log
I don't have the libXtst.so.6 file in any directory, and I can't seem to find it anywhere to download. Has anyone else run into this problem, or know a work around?
我在任何目录中都没有 libXtst.so.6 文件,而且我似乎无法在任何地方找到它来下载。有没有其他人遇到过这个问题,或者知道解决方法?
采纳答案by Gauthier Boaglio
EDIT:As mentioned by Stephen Niedzielskiin his comment, the issue seems to come from the 32-bit being of the JRE, which is de facto, looking for the 32-bit version of libXtst6
. To install the required version of the library:
编辑:正如Stephen Niedzielski在他的评论中提到的,问题似乎来自 JRE 的 32 位存在,事实上,它正在寻找libXtst6
. 要安装所需版本的库:
$ sudo apt-get install libxtst6:i386
Type:
类型:
$ sudo apt-get update
$ sudo apt-get install libxtst6
If this isn't OK, type:
如果这不行,请输入:
$ sudo updatedb
$ locate libXtst
it should return something like:
它应该返回如下内容:
/usr/lib/x86_64-linux-gnu/libXtst.so.6 # Mine is OK
/usr/lib/x86_64-linux-gnu/libXtst.so.6.1.0
If you do not have libXtst.so.6
but do have libXtst.so.6.X.X
create a symbolic link:
如果您没有libXtst.so.6
但确实libXtst.so.6.X.X
创建了一个符号链接:
$ cd /usr/lib/x86_64-linux-gnu/
$ ln -s libXtst.so.6 libXtst.so.6.X.X
Hope this helps.
希望这可以帮助。
回答by user5216380
This worked for me in Luna elementary OS
这在 Luna 基本操作系统中对我有用
sudo apt-get install libxtst6:i386
回答by Alex
Your problem comes from the 32/64 bit version of your JDK/JRE... Your shared lib is searched for a 32 bit version.
您的问题来自 JDK/JRE 的 32/64 位版本...您的共享库被搜索为 32 位版本。
Your default JDK is a 32 bit version. Try to install a 64 bit one by default and relaunch your `.sh file.
您的默认 JDK 是 32 位版本。尝试默认安装 64 位并重新启动您的 `.sh 文件。
回答by Darek Nowak
Had that issue on Ubuntu 14.04, In my case I had also libXtst.somissing:
在 Ubuntu 14.04 上有这个问题,就我而言,我也缺少libXtst.so:
Could not open library 'libXtst.so': libXtst.so: cannot open shared object
file: No such file or directory
Make sure your symbolic link is pointing to proper file, cd /usr/lib/x86_64-linux-gnu and list libXtst with:
确保您的符号链接指向正确的文件, cd /usr/lib/x86_64-linux-gnu 并列出 libXtst :
ll |grep libXtst
lrwxrwxrwx 1 root root 16 Oct 7 2016 libXtst.so.6 -> libXtst.so.6.1.0
-rw-r--r-- 1 root root 22880 Aug 16 2013 libXtst.so.6.1.0
Then just create proper symbolic link using:
然后只需使用以下方法创建适当的符号链接:
sudo ln -s libXtst.so.6 libXtst.so
List again:
再次列出:
ll | grep libXtst
lrwxrwxrwx 1 root root 12 Sep 20 10:23 libXtst -> libXtst.so.6
lrwxrwxrwx 1 root root 12 Sep 20 10:23 libXtst.so -> libXtst.so.6
lrwxrwxrwx 1 root root 16 Oct 7 2016 libXtst.so.6 -> libXtst.so.6.1.0
-rw-r--r-- 1 root root 22880 Aug 16 2013 libXtst.so.6.1.0
all set!
搞定!