歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Linux 添加lib庫文件

Linux 添加lib庫文件

日期:2017/2/28 16:20:50   编辑:Linux教程

Linux下添加lib庫文件

在 /etc/ld.so.conf 文件中添加庫的搜索路徑。

將自己可能存放庫文件的路徑都加入到/etc/ld.so.conf中是明智的選擇

添加方法也極其簡單,將庫文件的絕對路徑直接寫進去就OK了,一行一個。例如:

/usr/X11R6/lib

添加過路徑後使用命令ldconfig 更新ld.so.cache

/etc/ld.so.cache 是一個非文本的數據文件,不能直接編輯,它是根據 /etc/ld.so.conf 中設置的搜索路徑由 /sbin/ldconfig

Copyright © Linux教程網 All Rights Reserved