ubuntu安裝一個新的庫,找不到 lib.so庫的做法

以安裝libjson-c爲例子。

https://segmentfault.com/a/1190000012017022    轉載

git clone https://github.com/json-c/json-c.git
$ cd json-c/
$ ./autogen.sh
$ ./configure --prefix=xxx
$ make
$ make install

指定 安裝路徑爲  /opt/json-c

./configre --prefix ==/opt/json-c

安裝完後 ,設置軟連接

  ln -s 源文件(庫的真實路徑)   目標文件(新指定的不存在的文件 一個軟連接文件)

ln -s /opt/json-c/libjson.so /usr/local/lib/libjson

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章