[Mac OS X] 如何解決 “dtrace cannot control executables signed with restricted entitlements”?

HaveFunInLinux發表於2016-12-11

​本文轉載並參考至:http://stackoverflow.com/questions/33476432/is-there-a-workaround-for-dtrace-cannot-control-executables-signed-with-restri

在 OS X 10.11 El Capitan環境下,執行如下命令時會報錯:

sudo dtruss /bin/ls

dtrace: failed to execute /bin/ls: dtrace cannot control executables signed with restricted entitlements


一個workaround就是把對應的binary拷貝到那些非“restricted"的位置,如/tmp

如下:

sudo dtruss /tmp/ls


試了一下,可以正常動作。

相關文章