在Mac OSX中为GO安装delve

时间:2016-03-19 16:09:29

标签: go delve

我一直在尝试在我的环境中安装delve。 但是,钻孔无法启动,我无法解决这个问题。

操作系统:OSX Yosemite 10.10.4

Darwin内核版本14.4.0

 $GOPATH/bin/dlv debug main.go
 could not launch process: could not fork/exec

https://github.com/derekparker/delve/wiki/Building

我安装了以下上面提到的步骤URL。 安装成功并且以root用户正确启动。 除root用户外,Delve返回错误。

1)我已经创建了认证和签名申请

2)我在make命令之前杀死了taskgated,但是在make之后它再次启动。

3)如果我重命名这些文件,则此命令会失败。 /System/Library/LaunchDaemons/com.apple.taskgated-helper.plist /System/Library/LaunchDaemons/com.apple.taskgated.plist

codesign -s "dlv-cert" /Users/murotanimari/work/bin/dlv
error: One or more parameters passed to a function were not valid.

2 个答案:

答案 0 :(得分:1)

  1. brew install steeve / delve / delve - >这将安装delve并创建证书
  2. 转到delve文件夹,GOPATH / src / derek ... / delve
  3. 使用命令CERT = dlv-cert make install
  4. 安装delve的证书

答案 1 :(得分:0)

使用证书构建devl并进行签名是一项容易的任务,check this article显示了如何创建证书,对其进行签名并从源代码进行构建

  • 安装xcode构建工具xcode-select --install
  • 创建证书,并根据上文中的Key Chain详细信息进行签名。
  • 克隆回购 git clone https://github.com/go-delve/delve.git && cd delve
  • 使用证书构建: CERT=dlv-cert make install
  • 启用开发人员模式: sudo /usr/sbin/DevToolsSecurity -enable

  • 有关故障排除,请检查this link

要在delvOSX LinuxFreeBSD中安装Windows,这是他们的github Wiki页面,可帮助您安装它。 / p>

https://github.com/go-delve/delve/tree/master/Documentation/installation

有关如何使用它,其API和命令行界面的更多信息,请访问official documentation wiki