/usr/lib /usr/local/lib 和 /usr/lib/x86_64-linux-gnu 有什么区别?

mot*_*m79 3 linux shared-libraries

在我的 Linux 机器上,我libboost*.so在上述所有目录中都有 boost 库(文件)。我想知道它们之间有什么区别。我可以删除重复的 so 文件吗?

C0d*_*lus 7

差异:男人

它显示有关 Linux 文件系统层次结构中几乎每个文件/文件夹的简短而中肯的信息。对于您想知道的文件/文件夹,它说:

/usr/lib
          Object libraries, including dynamic libraries, plus some executables which
          usually are not invoked directly. More complicated programs may have whole
          subdirectories there.

/usr/local/lib
          Files associated with locally installed programs.
Run Code Online (Sandbox Code Playgroud)

对于文件/文件夹/usr/lib/x86_64-linux-gnu,我(不确定,但是)认为:

/usr/lib/x86_64-linux-gnu
          Files associated with locally installed programs for 64-bit architecture`
Run Code Online (Sandbox Code Playgroud)

我可以删除重复的 so 文件吗?

我不确定删除重复项的确切后果是什么,但建议不要这样做。读这个。

 /usr    This directory is usually mounted from a separate partition.
          It should hold only shareable, read-only data, so that it can
          be mounted by various machines running Linux.
Run Code Online (Sandbox Code Playgroud)

希望您注意到只读数据可共享的.

随意添加更多细节。