zoukankan      html  css  js  c++  java
  • Centos 7安装protobuf3.6.1

    新版本

    google protobuf-3.6.1是现在最新版本,添加了新的特性,看说明

    下载地址 https://github.com/protocolbuffers/protobuf/releases

    我下载的是protobuf-all-3.6.1.tar.gz 包

    新版本不需要执行autogen.sh脚本,直接./configure就行

    tar zvxf protobuf-all-3.6.1.tar.gz
    cd protobuf-3.6.1
     
    ./configure –prefix=/usr/local/
     
    sudo make  #要编译很久
    sudo make check
    sudo make install

    protoc –version #查看版本

    旧版本

    简介

    最近学习go语言,需要安装protobuf,但是网上的教程很多都不太适用于centos7 的系统。现在总结下protobuf在centos7下的安装教程。

    protobuf是Google开发出来的一个语言无关、平台无关的数据序列化工具,在rpc或tcp通信等很多场景都可以使用。通俗来讲,如果客户端和服务端使用的是不同的语言,那么在服务端定义一个数据结构,通过protobuf转化为字节流,再传送到客户端解码,就可以得到对应的数据结构。这就是protobuf神奇的地方。并且,它的通信效率极高,“一条消息数据,用protobuf序列化后的大小是json的10分之一,xml格式的20分之一,是二进制序列化的10分之一”。

    安装

    编译安装protobuf的编译器protoc

    wget https://github.com/google/protobuf/releases/download/v3.6.1/protobuf-all-3.6.1.tar.gz
    tar zxvf protobuf-all-3.6.1.tar.gz
    ./autogen.sh
    ./configure
    make
    make install

    错误处理

    1、./autogen.sh执行报错./autogen.sh: line 38: autoreconf: command not found

    安装autoconf和automake
    yum -y install gcc automake autoconf libtool make
    
    安装g++:
    yum install gcc gcc-c++
  • 相关阅读:
    selenium 18种元素定位方法
    python3+selenium配置可能报错记录
    adb+monkey压力测试入门
    appscan使用教程(全)
    appium---android元素定位
    QTP自动化测试
    postman Could not get any response。
    Jmeter接口测试+压力测试
    Android 偏门xml属性
    CrashHandler
  • 原文地址:https://www.cnblogs.com/fnlingnzb-learner/p/10534038.html
Copyright © 2011-2022 走看看