Home > Backend Development > Golang > Why golang grpc cannot be installed

Why golang grpc cannot be installed

(*-*)浩
Release: 2019-12-17 09:12:38
Original
2901 people have browsed it

Why golang grpc cannot be installed

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. #)

protoc

GRPC 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.

Compile


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
Copy after login

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
Copy after login

Note:

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template