Skip to content

Instantly share code, notes, and snippets.

@yangdm0209
Last active May 19, 2016 06:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yangdm0209/b3c040901406239377d5352070a984a2 to your computer and use it in GitHub Desktop.
Save yangdm0209/b3c040901406239377d5352070a984a2 to your computer and use it in GitHub Desktop.

1. 刚刚编译安装完成的库,却提示找不到这个库,这个时候需要手动执行一下ldconfig命令

ldconfig 命令的用途,主要是在默认搜寻目录(/lib和/usr/lib)以及动态库配置文件/etc/ld.so.conf内所列的目录下,搜索出可共享的动态 链接库,进而创建出动态装入程序(ld.so)所需的连接和缓存文件。缓存文件默认为 /etc/ld.so.cache,此文件保存已排好序的动态链接库名字列表。

ldconfig 通常在系统启动时运行,而当用户安装了一个新的动态链接库时,就需要手工运行这个命令。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment