尝试在第四个安装命令上安装Protobuf for J2ObjC时发生错误

时间:2018-12-23 23:03:46

标签: java macos terminal install protocol-buffers

我已经为此工作了一两天了,在这个特定问题上似乎找不到清晰的说明:

运行

后,当我尝试使用终端为macOS构建最新版本的protobuf时
$ ./configure
$ make
$ make check
$ sudo make install

我收到以下错误:

Making install in .
make[2]: Nothing to be done for `install-exec-am'.
 ./install-sh -c -d '/usr/lib/pkgconfig'
 /usr/bin/install -c -m 644 protobuf.pc protobuf-lite.pc '/usr/lib/pkgconfig'
install: /usr/lib/pkgconfig/protobuf.pc: Operation not permitted
make[2]: *** [install-pkgconfigDATA] Error 71
make[1]: *** [install-am] Error 2
make: *** [install-recursive] Error 1

我尝试运行“ make clean”然后重新编译,但是似乎没有帮助,并且我似乎无法在线找到任何有关protobuf的错误。有人有建议吗?

注意:我已尝试使用Home-brew安装protobuf,但似乎无法正常工作,因为在J2ObjC安装期间,它似乎无法找到Protobuf的根目录

1 个答案:

答案 0 :(得分:0)

我遇到了同样的问题并解决了。 问题是pkgconfig受mac限制。 因此,您需要禁用csrutil,并且可以在Mac恢复模式下进行操作。

只需点击这些链接即可。

  1. https://apple.stackexchange.com/questions/208478/how-do-i-disable-system-integrity-protection-sip-aka-rootless-on-macos-os-x

这是为了禁用该csrutil。

  1. https://www.macworld.co.uk/how-to/mac-software/mac-recovery-mode-3674052/

这将指导您如何进入恢复模式。

绝对可以。我设法解决了这个问题,从而安装了protobuf。