linux之ldconfig工具的使用
来源:互联网 发布:在哪设置淘宝宝贝分类 编辑:程序博客网 时间:2024/06/07 02:25
ldconfig命令的作用是:
ldconfig creates the necessary links and cache to the most recent shared libraries found in the directories specified on the command line, in the file /etc/ld.so.conf, and in the trusted directories (/lib and /usr/lib). The cache is used by the run-time linker, ld.so or ld-linux.so. ldconfig checks the header and filenames of the libraries it encounters when determining which versions should have their links updated.
ldconfig几个需要注意的地方!
1. 往/lib和/usr/lib里面加东西,是不用修改/etc/ld.so.conf的,但是完了之后要调一下ldconfig,不然这个library会找不到
2. 想往上面两个目录以外加东西的时候,一定要修改/etc/ld.so.conf,然后再调用ldconfig,不然也会找不到
比 如安装了一个mysql到/usr/local/mysql,mysql有一大堆library在/usr/local/mysql/lib下面,这时就 需要在/etc/ld.so.conf下面加一行/usr/local/mysql/lib,保存过后ldconfig一下,新的library才能在程 序运行时被找到。
3. 如果想在这两个目录以外放lib,但是又不想在/etc/ld.so.conf中加东西(或者是没有权限加东西)。那也可以,就是export一个全局变 量LD_LIBRARY_PATH,然后运行程序的时候就会去这个目录中找library。一般来讲这只是一种临时的解决方案,在没有权限或临时需要的时 候使用。
4. ldconfig做的这些东西都与运行程序时有关,跟编译时一点关系都没有。编译的时候还是该加-L就得加,不要混淆了。
5. 总之,就是不管做了什么关于library的变动后,最好都ldconfig一下,不然会出现一些意想不到的结果。不会花太多的时间,但是会省很多的事
- linux之ldconfig工具的使用
- linux之ldconfig工具的使用
- linux中ldconfig的使用
- linux中ldconfig的使用介绍
- linux中ldconfig的使用介绍
- linux中ldconfig的使用介绍
- Linux 之 ldconfig
- ldconfig的使用
- ldconfig的使用
- Linux命令之ldconfig详解
- Linux下的库操作工具-nm、ar、ldd、ldconfig和ld.so
- Linux下的库操作工具-nm、ar、ldd、ldconfig和ld.so
- Linux下的库操作工具-nm、ar、ldd、ldconfig和ld.so
- linux ldconfig
- linux 常用基本命令之三十一 ldconfig
- linux下查看对象文件依赖的动态库的工具ldd以及共享库缓存构建工具ldconfig介绍
- linux下动态共享库的创建,使用与更新(包括ldconfig的使用)
- linux下动态共享库的创建,使用与更新(包括ldconfig的使用)
- 技术网站
- 知识扫盲
- 几个比较常用的linux系统
- 查看Linux系统信息的常用命令
- Rails 每周专题转载
- linux之ldconfig工具的使用
- rails通过freetds连接sqlserver
- linxu ubuntu 12.04 下搭建rvm
- 配置vim for rails 开发
- vim 开发rails 常用命令
- flash报表
- Web开发相关网站
- 待整理
- 《十天学会web标准(div+css)》学习笔记