以安裝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