记录一个 brew 安装php72 debug 版的报错:/bin/sh: /usr/sbin/dtrace: Operation not permitted

由于开发扩展所以需要安装dev版的php ,mac命令如下:

brew install php72 –with-debug

可是我公司的mac电脑报如下错误

/bin/sh /private/tmp/php72-20171212-2705-15j0num/php-7.2.0/libtool –silent –preserve-dup-deps –mode=compile clang -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -ITSRM/ -I/private/tmp/php72-20171212-2705-15j0num/php-7.2.0/TSRM/ -DPHP_ATOM_INC -I/private/tmp/php72-20171212-2705-15j0num/php-7.2.0/include -I/private/tmp/php72-20171212-2705-15j0num/php-7.2.0/main -I/private/tmp/php72-20171212-2705-15j0num/php-7.2.0 -I/private/tmp/php72-20171212-2705-15j0num/php-7.2.0/ext/date/lib -I/usr/local/Cellar/libxml2/2.9.7/include/libxml2 -I/usr/local/opt/openssl/include -I/usr/local/opt/jpeg/include -I/usr/local/opt/libpng/include -I/usr/local/opt/freetype/include/freetype2 -I/usr/local/opt/gettext/include -I/private/tmp/php72-20171212-2705-15j0num/php-7.2.0/ext/mbstring/oniguruma -I/private/tmp/php72-20171212-2705-15j0num/php-7.2.0/ext/mbstring/libmbfl -I/private/tmp/php72-20171212-2705-15j0num/php-7.2.0/ext/mbstring/libmbfl/mbfl -I/private/tmp/php72-20171212-2705-15j0num/php-7.2.0/ext/sqlite3/libsqlite -I/usr/local/opt/readline/include -I/usr/local/opt/libsodium/include -I/usr/include/libxml2 -I/private/tmp/php72-20171212-2705-15j0num/php-7.2.0/ext/zip/lib -I/private/tmp/php72-20171212-2705-15j0num/php-7.2.0/TSRM -I/private/tmp/php72-20171212-2705-15j0num/php-7.2.0/Zend -no-cpp-precomp -I/usr/include -g -fvisibility=hidden -O0 -Wall -DZEND_SIGNALS -c /private/tmp/php72-20171212-2705-15j0num/php-7.2.0/TSRM/tsrm_strtok_r.c -o TSRM/tsrm_strtok_r.lo
CFLAGS=”-I/usr/include -g -fvisibility=hidden -O0 -Wall -DZEND_SIGNALS ” dtrace -h -C -s /private/tmp/php72-20171212-2705-15j0num/php-7.2.0/Zend/zend_dtrace.d -o Zend/zend_dtrace_gen.h.bak && sed -e ‘s,PHP_,DTRACE_,g’ Zend/zend_dtrace_gen.h.bak > Zend/zend_dtrace_gen.h
/bin/sh: /usr/sbin/dtrace: Operation not permitted
make: *** [Zend/zend_dtrace_gen.h] Error 126
make: *** Waiting for unfinished jobs….

READ THIS: https://docs.brew.sh/Troubleshooting.html

These open issues may also help:
php72-uuid 1.0.4 (new formula) https://github.com/Homebrew/homebrew-php/pull/4247

Error: A newer Command Line Tools release is available.
Update them from Software Update in the App Store.

网上搜了下说mac 需要 command+r 执行下 csrutil disable,可是操作后 依然无效,试了n次,都快放弃了,回到家里电脑试了下 竟然可以,看了下家里mac系统版本10.12.6,而公司的是10.12.4 ,升级了下 果然就可以了,真是浪费时间,这里记录下 避免其他小伙伴踩坑

关于 “记录一个 brew 安装php72 debug 版的报错:/bin/sh: /usr/sbin/dtrace: Operation not permitted” 的 1 个意见

发表评论

电子邮件地址不会被公开。 必填项已用*标注