zoukankan      html  css  js  c++  java
  • ProtocolBuffer 2.5.0 编译安装

    rotobuf-2.5.0.tar.gz的下载与安装

    1.下载

        hadoop使用protocol buffer进行通信,需要下载和安装protobuf-2.5.0.tar.gz。由于现在protobuf-2.5.0.tar.gz已经无法在官网https://code.google.com/p/protobuf/downloads/list中下载了,本人将protobuf-2.5.0.tar.gz上传到百度云盘供大家下载,地址: http://pan.baidu.com/s/1pJlZubT 。

    2.安装

        使用tar -zxf protobuf-2.5.0.tar.gz命令解压后得到是protobuf-2.5.0的源码,

        cd protobuf-2.5.0 进入目录

        假如你希望编译成功后输出的目录为/home/work/protobuf/ 则输入如下两条命令:

        ./configure --prefix=/home/work/protobuf/  

        make && make install

        编译成功后将export PATH=/home/work/protobuf/bin:$PATH加入到环境变量中

        最后输入 protoc --version命令,如显示libprotoc 2.5.0则安装成功

    3.错误及解决方法

    protoc: error while loading shared libraries: libprotoc.so.8: cannot open shared
    错误原因:
    protobuf的默认安装路径是/usr/local/lib,而/usr/local/lib 不在Ubuntu体系默认的 LD_LIBRARY_PATH 里,所以就找不到该lib
    解决方法:
    1. 创建文件 /etc/ld.so.conf.d/libprotobuf.conf 包含内容:

    1. /usr/local/lib  

    2. 输入命令
    sudo ldconfig 
    这时,再运行protoc --version 就可以正常看到版本号了

    http://blog.csdn.net/xocoder/article/details/9155901

    http://www.myexception.cn/cloud/1686981.html

    http://pan.baidu.com/s/1pJlZubT

  • 相关阅读:
    TCP源码—连接建立
    TCP系列02—连接管理—1、三次握手与四次挥手
    TCP系列01—概述及协议头格式
    ubuntu软件管理apt与dpkg
    318. Maximum Product of Word Lengths
    317. Shortest Distance from All Buildings
    316. Remove Duplicate Letters
    315. Count of Smaller Numbers After Self
    314. Binary Tree Vertical Order Traversal
    313. Super Ugly Number
  • 原文地址:https://www.cnblogs.com/yjstonestar/p/4918598.html
Copyright © 2011-2022 走看看