天天看點

macOS 上編譯 Dynamips

Dynamips 是一個Cisco 路由器模拟軟體。

安裝過程:

git clone git://github.com/GNS3/dynamips.git
cd dynamips
mkdir build
cd build
cmake ..
           

對于 macOS,需要準備好 cmake 和 libelf。

如果遇到報錯:

CMake Error at /usr/local/Cellar/cmake/3.10.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find LibElf (missing: LIBELF_LIBRARIES LIBELF_INCLUDE_DIRS)
           

就是沒有找到

LibElf

庫,可以用指令安裝:

brew install libelf
           

若要建構穩定釋出版本

cmake .. -DDYNAMIPS_CODE=stable
           

如果發生錯誤,可以嘗試指定 C 編譯器的路徑,可用 xcrun 指令找到相應的編譯器的路徑:

cmake ..  -DCMAKE_C_COMPILER=`xcrun -find cc`
           

最後編譯安裝 Dynamips

make install
           

┆涼┆暖┆降┆等┆幸┆我┆我┆裡┆将┆ ┆可┆有┆謙┆戮┆那┆ ┆大┆始┆ ┆然┆

┆薄┆一┆臨┆你┆的┆還┆沒┆ ┆來┆ ┆是┆來┆遜┆沒┆些┆ ┆雁┆終┆ ┆而┆

┆ ┆暖┆ ┆如┆地┆站┆有┆ ┆也┆ ┆我┆ ┆的┆有┆精┆ ┆也┆沒┆ ┆你┆

┆ ┆這┆ ┆試┆方┆在┆逃┆ ┆會┆ ┆在┆ ┆清┆來┆準┆ ┆沒┆有┆ ┆沒┆

┆ ┆生┆ ┆探┆ ┆最┆避┆ ┆在┆ ┆這┆ ┆晨┆ ┆的┆ ┆有┆來┆ ┆有┆

┆ ┆之┆ ┆般┆ ┆不┆ ┆ ┆這┆ ┆裡┆ ┆沒┆ ┆殺┆ ┆來┆ ┆ ┆來┆