centos 安装 protobuf
2015-11-23 14:47
519 查看
今天在一台新的服务器(centos)上安装protobuf
protobuf在github上的源码:https://github.com/google/protobuf
clone地址:https://github.com/google/protobuf.git
protobuf我的百度网盘地址: http://pan.baidu.com/s/1mgtTccK
下载后,网上都说让你./configure,实际上现在的版本好像暂时没这个文件,我们需要自己打开README看看,里面说让先运行./autogen.sh,但当运行的时候又说要先弄个gmock,如果您的服务器可以直接访问墙外还好说,如果不行,就又不成了。
我打开autogen.sh,发现它是要下载个文件,并解压到当前:
curl $curlopts -O https://googlemock.googlecode.com/files/gmock-1.7.0.zip
unzip -q gmock-1.7.0.zip
rm gmock-1.7.0.zip
mv gmock-1.7.0 gmock
我们可以选择直接区这个网址下载,或者用wget,或者您也可以用我网盘里的这个:
gmock: http://pan.baidu.com/s/1c0kFRXI
上面的完成之后,再运行./autogen.sh, 这时候再./configure ,
make
make check
make install
就可以了。
2016.06.23更新:
最新安装过程如下:
git clone https://github.com/google/protobuf.git cd protobuf/
git clone https://github.com/google/googlemock.git mv googlemock gmock
./autogen.sh
./configure
make
make check
make install
export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/usr/local/lib64:/usr/lib64
protobuf在github上的源码:https://github.com/google/protobuf
clone地址:https://github.com/google/protobuf.git
protobuf我的百度网盘地址: http://pan.baidu.com/s/1mgtTccK
下载后,网上都说让你./configure,实际上现在的版本好像暂时没这个文件,我们需要自己打开README看看,里面说让先运行./autogen.sh,但当运行的时候又说要先弄个gmock,如果您的服务器可以直接访问墙外还好说,如果不行,就又不成了。
我打开autogen.sh,发现它是要下载个文件,并解压到当前:
curl $curlopts -O https://googlemock.googlecode.com/files/gmock-1.7.0.zip
unzip -q gmock-1.7.0.zip
rm gmock-1.7.0.zip
mv gmock-1.7.0 gmock
我们可以选择直接区这个网址下载,或者用wget,或者您也可以用我网盘里的这个:
gmock: http://pan.baidu.com/s/1c0kFRXI
上面的完成之后,再运行./autogen.sh, 这时候再./configure ,
make
make check
make install
就可以了。
2016.06.23更新:
最新安装过程如下:
git clone https://github.com/google/protobuf.git cd protobuf/
git clone https://github.com/google/googlemock.git mv googlemock gmock
./autogen.sh
./configure
make
make check
make install
export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/usr/local/lib64:/usr/lib64
相关文章推荐
- linux centos目录结构(一)
- linux 上传文件 rz命令 提示command not found 解决方法
- linux设备驱动归纳总结(四):5.SMP下的竞态和并发
- linux下软件安装包讲解
- Linux下查看文件和文件夹大小
- 【Linux】Linux下JDK合理的安装位置
- linux常见命令用法之(一)
- linux 进程学习笔记-进程退出/终止进程
- linux 进程学习笔记-暂停进程
- linux 进程学习笔记-进程跟踪
- linux 进程学习笔记-等待子进程结束
- linux 进程学习笔记-进程pipe管道
- linux 进程学习笔记-named pipe (FIFO)命名管道
- linux 进程学习笔记-进程信号sigal
- linux 进程学习笔记-消息队列messagequeue
- linux 进程学习笔记-共享内存
- Linux下安装mysql------源码安装
- Linux SO_KEEPALIVE属性,心跳
- Centos 删除或重命名乱码文件
- Kconfig和Makefile,在Linux目录中增加目录