美文网首页
protobuf报错command not found: pro

protobuf报错command not found: pro

作者: shikaiming | 来源:发表于2021-03-11 15:07 被阅读0次

因为安装其他东西动了环境导致protobuf的命令无法执行。报错command not found: protoc。没找到原因,想着就直接卸载重装了protobuf。

$ brew uninstall protobuf
//然后重新安装
$ brew install protobuf
安装之后link失败了,报错如下

Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink lib/libprotobuf.a
Target /usr/local/lib/libprotobuf.a
already exists.

网上找了一圈,执行下就可以重新link了。

$ sudo chown -R `whoami` /usr/local
$ brew link --overwrite protobuf

然后protobuf指令也正常了。

  $ protoc --version

指令来源

相关文章

网友评论

      本文标题:protobuf报错command not found: pro

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