Installing delve for GO in Mac OSX

Viewed 5636

I have been trying to install delve in my environment. However , delve fails to start and I can't solve this problem.

OS: OSX Yosemite 10.10.4

Darwin Kernel Version 14.4.0

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

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

I installed delve following steps mentioned above URL. Install was succeeded and delve starts appropriately with root user. Delve returns error except root user.

1) I have created certification and signed application

2) I kill taskgated just before make command but it starts again after make.

3) If I rename these files, this command makes failure. /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.
3 Answers

Building devl with a certificate and signing it is an easy task, check this article that shows how to create cert, sign it and build from source

  • Install xcode build tools xcode-select --install
  • Create Certificate and sign it from Key Chain details in the article above.
  • Clone repo git clone https://github.com/go-delve/delve.git && cd delve
  • Build with cert: CERT=dlv-cert make install
  • Enable Developer mode: sudo /usr/sbin/DevToolsSecurity -enable

  • For troubleshooting, check this link

For Installing delv in OSX, Linux FreeBSD, or Windows, here's their github's wiki page that would help you how to install it.

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

For more information on how to use it, its APIs and command line interface, visit official documentation wiki

brew install delve

this one worked for me. but it seems you need to use homebrew from right beginning.

Related