歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Ubuntu下Nox編譯make不通過的解決方法和簡要安裝過程

Ubuntu下Nox編譯make不通過的解決方法和簡要安裝過程

日期:2017/2/28 14:35:59   编辑:Linux教程

在Ubuntu下安裝nox,make出錯如下:

>>>> collect2: ld returned 1 exit status
>>>> make[3]: *** [nox_core] Error 1
>>>> make[3]: Leaving directory `/usr/nox/build/src'
>>>> make[2]: *** [all-recursive] Error 1
>>>> make[2]: Leaving directory `/usr/nox/build/src'
>>>> make[1]: *** [all-recursive] Error 1
>>>> make[1]: Leaving directory `/usr/nox/nox13oflib/build'
>>>> make: *** [all] Error 2經過查資料,在參考文獻【1】發現是因為nox只能在boost1.50以上的版本才能編譯成功,而Ubuntu12.10版本的boost版本為1.42。所以要更新boost,我采取的方法是到boost官網www.boost.org下載源碼並且編譯。

下面列出簡要的安裝過程

安裝虛擬機:OpenFlow1.3_BiangHoo
IP:10.10.134.124
OS: ubuntu 12.10LTS

nox安裝:
安裝相關依賴包:

sudo apt-get install autoconf automake g++ libtool swig make git-core libboost-dev libboost-test-dev libboost-filesystem-dev libssl-dev libpcap-dev python-twisted python-simplejson python-dev

還要安裝libboost-all-dev 和libttb-dev
apt-get install libboost-all-dev libttb-dev
然後到到boost官網www.boost.org下載源碼並且編譯。我下載的是1.55版本.然後將boost安裝到/usr/local/目錄下

./bootstrap.sh --prefix=/usr/local/boost
然後
./b2 install
接著運行ldconfig使相關的庫生效

然後下載nox源碼
git clone git://github.com/noxrepo/nox
cd nox
./boot.sh
mkdir build
cd build
.././configure --with-boost=/usr/local/boost #boost的安裝位置
make
make install
即可安裝成功
啟動nox
cd PATH_TO_NOX/nox/build/src
./nox_core -i ptcp:6633

參考文獻【1】 http://www.linuxidc.com/Linux/2014-02/97216p2.htm

更多Ubuntu相關信息見Ubuntu 專題頁面 http://www.linuxidc.com/topicnews.aspx?tid=2

Copyright © Linux教程網 All Rights Reserved