빈번하게 gRPC를 빌드 하게 되어 스크립트를 만들어 gitgist에 공개했다.

다음 명령어 중 하나를 사용하여 설치할 수 있다.

wget을 사용하는 경우,

1
wget -O - https://gist.githubusercontent.com/moonyl/f015cfa96400beccba616a5068124a84/raw/8f293296b6c422a22df6c9229070d5c87e1b34c0/install-grpc.sh | bash

curl을 사용하는 경우,

1
curl -sSL https://gist.githubusercontent.com/moonyl/f015cfa96400beccba616a5068124a84/raw/8f293296b6c422a22df6c9229070d5c87e1b34c0/install-grpc.sh | bash

이 스크립트는 ‘sudo’ 권한이 필요하며, 필요한 경우 비밀번호를 입력하는 메시지가 나타난다.

스크립트를 실행한 후에는 터미널을 재시작하거나 ‘source ~/.bashrc’ 명령어를 실행하여 환경 변수를 적용해야 pkg-config가 정상적으로 반영되어서 재실행 시에 다시 빌드를 시도하는 상황을 피할 수 있다.

구현 내용이 궁금하다면 다음 링크에 코드를 확인해 볼 수 있다.

https://gist.github.com/moonyl/f015cfa96400beccba616a5068124a84

gRPC C++ Installation이미지 썸네일 삭제

gRPC C++ Installation

gRPC C++ Installation. GitHub Gist: instantly share code, notes, and snippets.

gist.github.com