找不到/安装libXtst.so.6?

时间:2013-06-28 01:27:31

标签: java linux ubuntu netbeans command-line

我正在运行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

我在任何目录中都没有libXtst.so.6文件,我似乎无法在任何地方找到它来下载。有没有其他人遇到这个问题,或者知道解决方法?

4 个答案:

答案 0 :(得分:131)

编辑:正如Stephen Niedzielski在评论中提到的那样,问题似乎来自JRE的32位,事实上,正在寻找32位版本libXtst6。要安装所需的库版本:

$ sudo apt-get install libxtst6:i386

类型:

$ sudo apt-get update
$ sudo apt-get install libxtst6

如果不正常,请输入:

$ sudo updatedb
$ locate libXtst

它应该返回类似的内容:

/usr/lib/x86_64-linux-gnu/libXtst.so.6       # Mine is OK
/usr/lib/x86_64-linux-gnu/libXtst.so.6.1.0

如果您没有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

希望这有帮助。

答案 1 :(得分:11)

这在Luna基本操作系统中对我有用

sudo apt-get install libxtst6:i386

答案 2 :(得分:6)

您的问题来自JDK / JRE的32/64位版本...您的共享库搜索了32位版本。

您的默认JDK是32位版本。尝试默认安装64位,并重新启动`.sh文件。

答案 3 :(得分:2)

在Ubuntu 14.04上有这个问题,在我的情况下我还缺少了 libXtst.so

Could not open library 'libXtst.so': libXtst.so: cannot open shared object 
file: No such file or directory

确保您的符号链接指向正确的文件, 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

然后使用以下方法创建正确的符号链接:

sudo ln -s libXtst.so.6 libXtst.so

再次列出:

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

全部设定!