mac編譯安裝protobuf

2021-09-05 08:44:54 字數 1014 閱讀 2487

1、在安裝protobuf之前需要先安裝git、make、automake等工具,安裝方法請參考:

2、在安裝好protobuf後需要安裝protobuf,依賴庫,首先使用:git clone 轉殖,如下圖所示:

3、然後進入到protobuf目錄執行./autogen.sh,此時會出現

configure.ac:104: error: possibly undefined macro: ac_prog_libtool

if this token and others are legitimate, please use m4_pattern_allow.錯誤,如下圖所示:

4、需要安裝libtool,使用brew install libtool安裝,如下圖所示:

5、再次執行./autogen.sh即可,如下圖所示:

6、然後執行:./configure,如下圖所示:

7、然後執行make命令,如下圖所示:

8、然後執行make install進行安裝,如下圖所示:

protobuf編譯安裝

github上有詳細的安裝說明 1 確定centos7上已經安裝了下面的軟體,或者直接用yum進行更新 autoconf automake libtool curl used to download gmock make g unzip tar zxvf protobuf 3.1.0.tar.gz ...

protobuf編譯安裝

安裝新增環境變數 解除安裝依次輸入 configure make j8 make check sudo make install其中,configure可以通過引數來制定安裝位置,如 configure prefix path path 換成指定的位置 推薦安裝到 usr下,這樣會和apt get ...

protobuf 編譯安裝

1 protobuf是google公司提出的資料儲存格式,詳細介紹可以參考 tar zxf protobuf 2.5.0.tar.gz mkdir usr local protobuf 2.5.0 cd usr local protobuf 2.5.0 opt protobuf 2.5.0 conf...