ubuntun 16.04 protobuf安装过程
由于caffe的数据结构以及模型参数是采用的google protobuf在按照caffe之前需要首先安装protobuf
具体安装过程可以参考官网的github说的比较清楚
https://github.com/protocolbuffers/protobuf/blob/master/src/README.md
准备
安装前需要首先安置protobu依赖的工具,如下列表:
- autoconf
- automake
- libtool
- make
- g++
- unzip
ubutun内统一安装命令为:
$ sudo apt-get install autoconf automake libtool curl make g++ unzip
下载源码
github下载最新源码:
git clone https://github.com/protocolbuffers/protobuf.git
cd protobuf
git submodule update --init --recursive
./autogen.sh
编译
编译源码,并安装
./configure
make
make check
sudo make install
sudo ldconfig # refresh shared library cache.
默认安装位置为/usr/local
如果要修改安装位置可以使用一下命令:
./configure --prefix=/usr
运行结果
make
运行结果如下,编译时间较长,需要耐心等待:
make check
make check编译check部分:
make install 安装如下:
查看版本: protoc --version