1. 安裝scons
2.安裝jsonspp
解壓->進入目錄->安裝->檢視是否成功
tar zxvf scons-2.5.1.tar.gz
cd scons-2.5.1/
python setup.py install
scons -v
解壓->進入目錄->編譯
tar zvxf jsoncpp-src-0.5.0.tar.gz
cd jsoncpp-src-0.5.0
sudo scons platform=linux-gcc
移動lib檔案
sudo cp -r include/json /usr/local/include/
cp libs/linux-gcc-4.8.5/* /usr/local/lib
配置環境變數
vim /etc/profile
新增以下內容:
export ld_library_path=$ld_library_path:/usr/local/lib
export library_path=$library_path:/usr/local/lib
儲存退出,重新整理
source /etc/profile
進入目錄,更改鏈結庫名稱
cd /usr/local/lib
mv libjson_linux-gcc-4.8.5_libmt.a libjson.a
mv libjson_linux-gcc-4.8.5_libmt.so libjson.so
完成參考鏈結
CentOS 編譯安裝 Lua LuaSocket
centos5.5 lua5.1.4 luasocket2.0.2 usr bin ld cannot find lreadline 直接 make 會報錯,缺少依賴。yum y install gcc make ncurses devel readline devel wget tar zxvf ...
CentOS 編譯安裝 Lua LuaSocket
centos5.5 lua5.1.4 luasocket2.0.2 usr bin ld cannot find lreadline 直接 make 會報錯,缺少依賴。yum y install gcc make ncurses devel readline devel wget tar zxvf ...
Centos 編譯安裝ACE
這裡只安裝了ace,其他的包沒有涉及。1.tar xvf ace x.x.x.tar.gz 2.設定環境變數 vim bashrc export ace root home yourname export ld library path ld library path ace root ace cd...