Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to compile and install grpc in Centos7.3

Shulou Source: shulou.com Published: 2022-06-01 18:35:34 11月03日 Update

In this issue, the editor will bring you about how to compile and install grpc in Centos7.3. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.

Related tool yum install-y gcc gcc-c++ autoconf libtoolyum groupinstall-y "Development Tools" download source code git clone https://github.com/grpc/grpc.gitcd grpcgit submodule update-- init compilation and installation protobufcd third_party/protobuf/./autogen.sh./configuremakemake installldconfig # refresh shared library cache.which protocprotoc-- version

You need to download the Google Code code in autogen.sh and ensure that it can be accessed.

Compile and install grpccd.. /.. make

Question:

/ 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

Solution:

Echo $LD_LIBRARY_PATHexport LD_LIBRARY_PATH=/usr/local/lib/:/root/git/grpc/libs/opt/makemake install Test C++ Democd examples/cpp/helloworldmake

Question:

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 variableNo package 'protobuf' found

Solution:

Echo $PKG_CONFIG_PATHexport PKG_CONFIG_PATH=/root/git/grpc/libs/opt/pkgconfig:/root/git/grpc/third_party/protobufmake./greeter_server &. / greeter_client above is how to compile and install grpc in the Centos7.3 shared by the editor. If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

Tags: Compilation content method problem analysis specialty small and medium code rich content that is tools articles more source code knowledge articles industry perspective information information channels Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Shulou Tech Info Microsoft Shulou Information MySQL