grpc is an open source RPC framework released by Google at the end of February 2015. Its source code is written in C language.
According to Google, grpc is a high-performance, open source, general-purpose RPC framework that puts mobile and HTTP/2 first. #)
protocGRPC uses protobuf as the message format by default, and protoc is the compiler of the protobuf protocol. Therefore, before building GRPC, ensure that protoc has Install.
Note:
The Makefile in the gRpc source code will automatically detect whether protoc has been installed on the current system. If it is not installed, it will automatically remove it from the third party in its project. Install it in the library source code directory.
Execute the following commands to compile, build and install
git clone -b $(curl -L https://grpc.io/release) https://github.com/grpc/grpc cd grpc git submodule update --init make sudo make install
Notice that the first line of command is to install the release branch If you want to install the latest version on master HEAD, then directly
$ git clone https://github.com/grpc/grpc
During the compilation process, you may encounter openssl1.1.0 and the old one. There is an incompatibility issue with version openssl1.0.1 (the old version openssl1.0.1 used by grpc). That is to say, if the local environment uses openssl1.1.0, an error will appear when compiling grpc. You can search for solutions in Google.
The above is the detailed content of Why golang grpc cannot be installed. For more information, please follow other related articles on the PHP Chinese website!