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 install <packageName>
卸载任意包 $ brew uninstall <packageName>
查询可用包 $ brew search <packageName>
查看已安装包列表 $ brew list
查看任意包信息 $ brew info <packageName>
更新 Homebrew $ brew update
查看 Homebrew 版本 $ brew -v
2. 安装thrift
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