标签: ld.so.conf

使用 ldconfig 和 ld.so.conf 与 LD_LIBRARY_PATH

我经常从源代码构建各种库以供使用,例如 gmp-6.1.2、mpfr-4.0.1 和 gcc-7.x。这样做时,我更喜欢使用,--prefix=/usr/local/gcc-7.2.0所以我确切地知道它的安装位置并且不会弄乱现有的库。然后我基本上只知道最后make install告诉我的是更新或设置LD_LIBRARY_PATH,有时但不总是LD_RUN_PATH

大多数情况下,我只是LD_LIBRARY_PATH稍后根据需要手动设置,或者以类似的方式全局设置它/etc/bash.bashrc.local并且有效。

make install就是说:

Libraries have been installed in:
  /usr/local/mfprtest/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
  - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable …
Run Code Online (Sandbox Code Playgroud)

libraries gcc ldconfig ld.so.conf

13
推荐指数
1
解决办法
3万
查看次数

标签 统计

gcc ×1

ld.so.conf ×1

ldconfig ×1

libraries ×1