“please check gdb is codesigned - see taskgated(8)” - How to get gdb installed with homebrew code signed?

前端 未结 10 785
栀梦
栀梦 2020-12-02 04:20

I\'m under osx 10.8.4 and have installed gdb 7.5.1 with homebrew (motivation get a new gdb with new features such as --with-python etc... )

Long story short when I

10条回答
  •  感动是毒
    2020-12-02 04:57

    For anyone who using Sierra 10.12.6 (and above) and Homebrew, /usr/local/bin/gdb is a symbolic link to /usr/local/Cellar/gdb/8.0/bin/gdb (or whatever version, e.g. 8.0.1).

    You need to codesign both link and target:

    codesign -fs gdb-cert /usr/local/bin/gdb
    codesign -fs gdb-cert "/usr/local/Cellar/gdb/8.0/bin/gdb"
    

    Or, if you have greadlink (installed via brew install coreutils):

    codesign -fs gdb-cert $(which gdb)
    codesign -fs gdb-cert $(greadlink -f $(which gdb))
    

提交回复
热议问题