Segmentation fault: 11 when attempting to codesign .app

后端 未结 3 1157
名媛妹妹
名媛妹妹 2021-02-19 09:48

I haven\'t been able to find a definition for this error in relation to codesigning. I\'m really quite stumped as of what to do.

The error occurs when attempting to exec

3条回答
  •  执笔经年
    2021-02-19 10:24

    A solution I found on the Apple forum worked for me: first, run the following command to find your identity's hex ID:

    $ security find-identity -v
    1) A048017A43F8C9C993128B0101B81CD07049601E "lldb_codesign"
    ...
    

    Then you can use that hex identifier to sign:

    codesign -s A048017A43F8C9C993128B0101B81CD07049601E /usr/local/bin/gdb
    

    Some other tips I came across while debugging this:

    • You have to give the full path to the binary (/usr/local/bin/gdb, not just gdb). It won't look on the PATH, I assume for security reasons.
    • You have to run the codesign as root if the directory your binary is in is not user-owned.

提交回复
热议问题