您好,登錄后才能下訂單哦!
這期內容當中小編將會給大家帶來有關Centos7.3中怎么編譯安裝grpc,文章內容豐富且以專業的角度為大家分析和敘述,閱讀完這篇文章希望大家可以有所收獲。
yum install -y gcc gcc-c++ autoconf libtool yum groupinstall -y "Development Tools"
git clone https://github.com/grpc/grpc.git cd grpc git submodule update --init
cd third_party/protobuf/ ./autogen.sh ./configure make make install ldconfig # refresh shared library cache. which protoc protoc --version
autogen.sh里需要下載Google Code的代碼,需要保障其能被訪問
cd ../.. make
問題:
/root/git/grpc/bins/opt/grpc_cpp_plugin: error while loading shared libraries: libprotoc.so.15: cannot open shared object file: No such file or directory
解決辦法:
echo $LD_LIBRARY_PATH export LD_LIBRARY_PATH=/usr/local/lib/:/root/git/grpc/libs/opt/ make make install
cd examples/cpp/helloworld make
問題:
Package protobuf was not found in the pkg-config search path. Perhaps you should add the directory containing `protobuf.pc' to the PKG_CONFIG_PATH environment variable No package 'protobuf' found
解決辦法:
echo $PKG_CONFIG_PATH export PKG_CONFIG_PATH=/root/git/grpc/libs/opt/pkgconfig:/root/git/grpc/third_party/protobuf make ./greeter_server & ./greeter_client
上述就是小編為大家分享的Centos7.3中怎么編譯安裝grpc了,如果剛好有類似的疑惑,不妨參照上述分析進行理解。如果想知道更多相關知識,歡迎關注億速云行業資訊頻道。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。