如何安装脚本确定哪些是32位和64位库的/ usr / lib的正确等效项?

我有一个SDK,它必须在各种Linux发行版的/ usr / lib下的正确位置安装32位和64位文件。

例如,对于Fedora来说,/ usr / lib64是64位,但是对于基于Debian的系统,/ usr / lib是64位目录。

我想知道是否有可靠的方法来确定正确的位置。

更具体地说,是否有一种方法安装脚本可以通过编程来确定哪些是给定分布上的32位和64位库/ usr / lib的正确等效项?

在我的Ubuntu服务器上,我有path/usr/lib64/指向path/usr/lib/ 。 众所周知,Ubuntu是一个基于Debian的系统。 所以,你可以在Fedora和Ubuntu上安装64位的lib / usr / lib64。

另外,看看这个网页 。 他们build议在/usr/local/lib安装这些库。

 The GNU standards recommend installing by default all libraries in /usr/local/lib when distributing source code (and all commands should go into /usr/local/bin). They also define the convention for overriding these defaults and for invoking the installation routines. 

您必须确保您的libspath包含在ldconfigconfiguration文件中。