protobuf 编译安装指南

简介

官网
https://developers.google.com/protocol-buffers/docs/overview

安装 Nagascan的时候 依赖 protobuf

下载源码

https://github.com/google/protobuf/releases

protobuf-cpp-3.3.0.zip

安装指南

src/README.md
https://github.com/google/protobuf/blob/master/src/README.md

默认路径

1
2
3
4
5
6
/usr/local/bin/protoc
/usr/local/include/google/protobuf
protobuf-include-dir: /usr/local/include
protobuf-include-dir: /usr/local/include/google/protobuf
protobuf-lib-dir: /usr/local/lib

mysql-connector

1
sudo pip install mysql-connector --install-option='--with-protobuf-include-dir=/usr/local/include/google/protobuf' --install-option='--with-protobuf-lib-dir=/usr/local/lib' --install-option='--with-protoc=/usr/local/bin/protoc'