美文网首页
Ubuntu16.04下安装Google protobuf的方法

Ubuntu16.04下安装Google protobuf的方法

作者: 汪和呆喵 | 来源:发表于2018-12-28 17:58 被阅读0次

    google protobuf 安装方法:

    下载:

    https://github.com/google/protobuf/releases --> protobuf-all-3.6.0.zip

    编译安装流程(注意加上sudo防止创建目录权限不足):

    unzip protobuf-all-3.6.0.zip
    cd protobuf-all-3.6.0
    ./autogen.sh
    ./configure --prefix=/usr/local/protobuf
    (https://www.cnblogs.com/darkknightzh/p/5782992.html ./configure --prefix=/usr)
    sudo make -j8 && sudo make install
    ldconfig

    环境变量配置:

    sudo gedit ~/.bashrc
    添加: PATH=/usr/local/protobuf/bin:$PATH
    (如果findpackage报错注意添加lib和include到环境变量)
    source ~/.bashrc

    相关文章

      网友评论

          本文标题:Ubuntu16.04下安装Google protobuf的方法

          本文链接:https://www.haomeiwen.com/subject/tryelqtx.html