Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac OS Sierra 10.12.2 - Delve install via Homebrew broken #702

Closed
andrewbruno opened this issue Jan 12, 2017 · 17 comments
Closed

Mac OS Sierra 10.12.2 - Delve install via Homebrew broken #702

andrewbruno opened this issue Jan 12, 2017 · 17 comments
Labels

Comments

@andrewbruno
Copy link

andrewbruno commented Jan 12, 2017

Please update the documentation to highlight that it does not work on OSX 10.12.2

Error message is: could not launch process: could not get thread count

This is how I got it to work:

— Install via brew
— then you need to change delve version locally.

cd $GOPATH/src/github.com/derekparker/'
cd delve
git fetch origin pull/665/head
git checkout FETCH_HEAD
CERT=dlv-cert make install

Make sure you run the one you built, i.e. $GOPATH/bin/dlv debug

@aaronhackney
Copy link

@andrewbruno Thanks for this.
Are you cloning the repo into $GOPATH/src/github.com/derekparker/ before you git fetch origin pull/665/head? Or should brew be putting it there?
I've been trying every combination in 10.12.2 with no luck.
Thanks!

@christian-boks
Copy link

@aaronhackney I followed these two instructions on how to do a manual install (after installing with brew).

And then used @andrewbruno's instructions to get it working.

@aaronhackney
Copy link

aaronhackney commented Jan 18, 2017

Thanks for the feedback. Here is what I have learned:

  1. I installed on my home iMac running 10.12.2 using the HEAD method and delve works just fine!

  2. Installing on my Macbook Pro Laptop, which has my company's corporate image on it, I get the errors and it does not work. I used the exact same method and I'm running the exact same version of 10.12.2. I suspect there is some corporate security software that is preventing delve from accessing the threads, even though, when prompted, I entered my credentials with super-user access. Perhaps it's anti-virus or something. I'm not sure. I'm going to attempt to find out from our help desk what we may be running that could be interfering with delve's thread access. Thanks again for the suggestions!

Here is a gist of a successful install on 10.12.2 if anyone is interested.
https://gist.github.com/aaronhackney/1ad35a5824bd66701504f9156fcdc99a

Thanks!

@barthr
Copy link

barthr commented Jan 19, 2017

Can confirm this worked for me!

@aaronhackney
Copy link

I was able to trace my issue to the Crowd Strike Falcon Host protection client installed on my MBP. https://www.crowdstrike.com/products/falcon-host/ Once I removed this client, the thread issues went away. We have opened a ticket with CrowdStrike to see if we can get delve whitelisted.

@aaronhackney
Copy link

@derekparker Since the Mac OSX issue seems to come up a lot in the issues section, I made a quick howto detailing as many steps as I could. https://github.com/aaronhackney/delve_on_mac
Thanks again for your project!

@jsaguiar
Copy link

this worked for me:
brew install go-delve/delve/delve --HEAD

@derekparker
Copy link
Member

This should be solved, the latest version of Delve should now be available in the latest HomeBrew formula as of go-delve/homebrew-delve@f27054f (merged 4 days ago).

@jingxize
Copy link

when I install delve on OSX use homebrew ,it failed.I got the message follow:

$brew install go-delve/delve/delve
==> Tapping go-delve/delve
Cloning into '/usr/local/Homebrew/Library/Taps/go-delve/homebrew-delve'...
remote: Counting objects: 7, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 7 (delta 0), reused 5 (delta 0), pack-reused 0
Unpacking objects: 100% (7/7), done.
Tapped 1 formula (33 files, 41.4KB)
==> Installing delve from go-delve/delve
==> Installing dependencies for go-delve/delve/delve: go
==> Installing go-delve/delve/delve dependency: go
==> Downloading https://homebrew.bintray.com/bottles/go-1.9.2.el_capitan.bottle.tar.gz
######################################################################## 100.0%
==> Pouring go-1.9.2.el_capitan.bottle.tar.gz
==> Caveats
A valid GOPATH is required to use the go get command.
If $GOPATH is not specified, $HOME/go will be used by default:
https://golang.org/doc/code.html#GOPATH

You may wish to add the GOROOT-based install location to your PATH:
export PATH=$PATH:/usr/local/opt/go/libexec/bin
==> Summary
/usr/local/Cellar/go/1.9.2: 7,646 files, 293.9MB
==> Installing go-delve/delve/delve
==> Downloading https://github.com/derekparker/delve/archive/v1.0.0-rc.2.tar.gz
==> Downloading from https://codeload.github.com/derekparker/delve/tar.gz/v1.0.0-rc.2
######################################################################## 100.0%
security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.
==> Generating dlv-cert
==> openssl req -new -newkey rsa:2048 -x509 -days 3650 -nodes -config dlv-cert.cfg -extensions codesign_reqext -batch -out dlv-ce
==> [SUDO] Installing dlv-cert as root
==> sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain dlv-cert.cer
Last 15 lines from /Users/leeco/Library/Logs/Homebrew/delve/02.sudo:
2017-11-21 18:57:52 +0800

sudo
security
add-trusted-cert
-d
-r
trustRoot
-k
/Library/Keychains/System.keychain
dlv-cert.cer

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/go-delve/homebrew-delve/issues

These open issues may also help:
Upgrade to delve fails go-delve/homebrew-delve#20

@derekparker ,@jsaguiar:
your advices are useful. The latest version can solves the problem.
so,install the latest version,then it is success.
brew install go-delve/delve/delve --HEAD

@zerak
Copy link

zerak commented Dec 21, 2017

➜ dev brew install go-delve/delve/delve --HEAD
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
libressl

==> Installing delve from go-delve/delve
==> Cloning https://github.com/derekparker/delve.git
Updating /Users/zerak/Library/Caches/Homebrew/delve--git
==> Checking out branch master
security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.
==> Generating dlv-cert
==> openssl req -new -newkey rsa:2048 -x509 -days 3650 -nodes -config dlv-cert.cfg -extensions codesign_reqext -batch -out dlv-cert.cer -keyout dlv-cert.key
==> [SUDO] Installing dlv-cert as root
==> sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain dlv-cert.cer
Last 15 lines from /Users/zerak/Library/Logs/Homebrew/delve/02.sudo:
2017-12-22 01:03:34 +0800

sudo
security
add-trusted-cert
-d
-r
trustRoot
-k
/Library/Keychains/System.keychain
dlv-cert.cer

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/go-delve/homebrew-delve/issues

These open issues may also help:
Upgrade to delve fails go-delve/homebrew-delve#20
➜ dev go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/zerak/Project/goPro/"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/4y/4gqbm3y57dn7n0nfzmwg9c1h0000gn/T/go-build802535093=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
➜ dev brew info delve
go-delve/delve/delve: stable 1.0.0-rc.2, HEAD
Debugger for the Go programming language.
https://github.com/derekparker/delve
Not installed
From: https://github.com/go-delve/homebrew-delve/blob/master/Formula/delve.rb
==> Dependencies
Build: go ✔
==> Caveats
If you get "could not launch process: could not fork/exec", you need to try
in a new terminal.

When uninstalling, to remove the dlv-cert certificate, run this command:

$ sudo security delete-certificate -t -c dlv-cert /Library/Keychains/System.keychain

Alternatively, you may want to delete from the Keychain (with the Imported private key).

the go version go1.9.2 darwin/amd64
it's not work for me
macOs version 10.13.2

@unjello
Copy link

unjello commented Jan 28, 2018

Same here. macOS 10.13.3, --HEAD or not, cannot install delve with exact same error.

@mihei
Copy link

mihei commented Feb 3, 2018

@unjello also on macOS 10.13.3, this worked for me:

  • xcode-select --install
  • brew install go-delve/delve/delve --HEAD

$ dlv version
Delve Debugger
Version: 1.0.0-rc.2
Build: 62fe792

and

go version go1.9.3 darwin/amd64

@unjello
Copy link

unjello commented Feb 3, 2018

@mihei hmm... wierd. It did indeed install today as you say. Maybe just a glitch in a spore network. Thanks for making me re-try it!

@koliyo
Copy link

koliyo commented Feb 7, 2018

Same problem for me on 10.13.3 (17D47)

brew install -vd go-delve/delve/delve --HEAD
==> sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain dlv-cert.cer
Failed to execute: sudo
/usr/local/Homebrew/Library/Homebrew/build.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/python.rb
/usr/local/Homebrew/Library/Homebrew/debrew.rb:11:in `raise'

If this was mentioned on the install page it would have saved me a lot of trouble.

@koliyo
Copy link

koliyo commented Feb 7, 2018

The fix mentioned here works for me

@wywsoor
Copy link

wywsoor commented Oct 25, 2018

`brew install go-delve/delve/delve --HEAD

Error: No available formula with the name "go-delve/delve/delve"
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
Error: No similarly named formulae found.`

@graper-guo
Copy link

`brew install go-delve/delve/delve --HEAD

Error: No available formula with the name "go-delve/delve/delve"
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
Error: No similarly named formulae found.`

rm -rf /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core
brew install go-delve/delve/delve --HEAD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests