thrift

1.先安装brew

   打开终端,输入ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

  然后一会会跳出这个语句:Press RETURN to continue or any other key to abort按回车键,开始安装。

  以上过程可能需要输入你的本机账号密码,直接输入然后按回车键即可,

  使用brew help确定是否安装成功。
    =============卸载brew
    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
  ================ 

    安装任意包    $ brew install <packageName>

    卸载任意包    $ brew uninstall <packageName>

    查询可用包    $ brew search <packageName>

    查看已安装包列表  $ brew list 

   查看任意包信息    $ brew info <packageName>

   更新 Homebrew   $ brew update

   查看 Homebrew 版本  $ brew -v


2. 安装thrift
    brew install thrift
 安装后会出现keg-only提示,没有管他。
    

  A CA file has been bootstrapped using certificates from the system

  keychain. To add additional certificates, place .pem files in

    /usr/local/etc/openssl@1.1/certs

 

  and run

    /usr/local/opt/openssl@1.1/bin/c_rehash

 

  openssl@1.1 is keg-only, which means it was not symlinked into /usr/local,

  because openssl/libressl is provided by macOS so don't link an incompatible version.

 

  If you need to have openssl@1.1 first in your PATH run:

    echo 'export PATH="/usr/local/opt/openssl@1.1/bin:$PATH"' >> ~/.bash_profile

 

  For compilers to find openssl@1.1 you may need to set:

    export LDFLAGS="-L/usr/local/opt/openssl@1.1/lib"

    export CPPFLAGS="-I/usr/local/opt/openssl@1.1/include"

 

3.编译文件

 

  thrift -o /path -r -gen java nucdl.thrift 

posted @ 2019-11-18 18:05  jason47  阅读(318)  评论(0编辑  收藏  举报