Ubunt中卸载protobuf与安装3.6.0版本步骤
生活随笔
收集整理的這篇文章主要介紹了
Ubunt中卸载protobuf与安装3.6.0版本步骤
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1.卸載Ubuntu自帶的protobuf;
# sudo apt-get remove libprotobuf-dev # which protoc// 運行完“which protoc”會顯示一個protoc的路徑,如果沒有顯示則下面這條命令不必執行
# rm /usr/local/bin/protoc// 具體路徑以“which protoc”顯示的為準
到此,低版本的protobuf卸載完成。
2.安裝特定版本的protobuf,在此以安裝protobuf3.6.0為例;
前提:確保以下幾個庫都有安裝
# sudo apt-get install autoconf automake libtool curl make g++ unzip(1).從github克隆特定版本的protobuf源碼;
# git clone -b v3.6.0 https://github.com/protocolbuffers/protobuf.git// 上述命令表示克隆版本為3.6.0的protobuf源碼
# cd protobuf # git submodule update --init --recursive// 該命令表示克隆protobuf的子模塊,主要是gtest
(2).編譯protobuf源碼并安裝;
// 進入到克隆的protobuf目錄
# cd protobuf # ./autogen.sh # ./configure # make// 如果沒有克隆子模塊,make check會失敗但是可以繼續make install,但是使用某些功能時可能會出錯
# make check # sudo make install # sudo ldconfig// 輸出protobuf版本信息則表示安裝成功
# `protoc --version`版權聲明:本文為晚歸原創文章,遵循 CC 4.0 BY-SA 版權協議,轉載請附上原文出處鏈接和本聲明。
本文鏈接:https://blog.csdn.net/FK2016/article/details/83375048
總結
以上是生活随笔為你收集整理的Ubunt中卸载protobuf与安装3.6.0版本步骤的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 电脑版全民k歌(电脑版全民k歌怎么调进度
- 下一篇: 好用的千元机推荐(目前便宜又好用的千元手