在 Ubuntu 上安裝 Protobuf 3 的教程詳解
什么時候需要安裝
如果使用 protoc 命令,遇到 Protoc not found,表示未安裝?;蛘?,執(zhí)行時出現錯誤:This parser only recognizes "proto2",則表示不是3.0版。
安裝過程及可能遇到的問題
安裝指令
詳細介紹請參考此文:protobuf簡單介紹和ubuntu 16.04環(huán)境下安裝
依次執(zhí)行以下命令,下載源碼編譯安裝,需要較長時間,超過10分鐘。
sudo apt-get install autoconf automake libtool curl make g++ unzip git clone https://github.com/google/protobuf.git cd protobuf git submodule update --init --recursive ./autogen.sh ./configure make make check sudo make install sudo ldconfig # refresh shared library cache.
可能遇到問題
很有可能,執(zhí)行過程中會出現以下錯誤提示:
./autogen.sh: 4: ./autogen.sh: autoreconf: not found
解決辦法:執(zhí)行以下命令即可。
sudo apt-get install autoconf sudo apt-get install automake sudo apt-get install libtool
安裝完成之后
執(zhí)行以下命令驗證安裝結果,查看版本號。
protoc --version
恭喜得到:libprotoc 3.9.0 或更高版本號。
總結
以上所述是小編給大家介紹的在 Ubuntu 上安裝 Protobuf 3 的教程,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復大家的。在此也非常感謝大家對腳本之家網站的支持!
如果你覺得本文對你有幫助,歡迎轉載,煩請注明出處,謝謝!
相關文章
linux 遠程控制windows系統(tǒng)下的程序(三種方法)
這篇文章主要介紹了linux 遠程控制windows下的程序,本文通過三種方法給大家詳細介紹,需要的朋友可以參考下2019-10-10
linux 程序安裝目錄/opt目錄和/usr/local目錄的區(qū)別
這篇文章主要介紹了linux 程序安裝目錄/opt目錄和/usr/local目錄的區(qū)別,需要的朋友可以參考下2018-06-06
Ubuntu系統(tǒng)下用Crontab命令定時執(zhí)行PHP文件詳解
這篇文章主要給大家介紹了在Ubuntu系統(tǒng)下用Crontab命令定時執(zhí)行PHP文件的相關資料,文中介紹的非常詳細,對大家具有一定的參考學習價值,需要的朋友們下面來一起看看吧。2017-06-06

