16

I trying install InfluxDB client. But installation failed. This is my trace:

go get -u -v -x github.com/influxdb/influxdb/client
github.com/influxdb/influxdb (download)
...
git remote -v
Fetching https://golang.org/x/crypto/bcrypt?go-get=1
[1]    6625 segmentation fault (core dumped)  go get -u -v -x github.com/influxdb/influxdb/client

I did not find package golang.org/x/crypto/bcrypt into GOROOT and GOPATH.

When I trying install crypto/bcrypt I have this error:

go get -u -v golang.org/x/crypto/bcrypt
Fetching https://golang.org/x/crypto/bcrypt?go-get=1
[1]    7667 segmentation fault (core dumped)  go get -u -v golang.org/x/crypto/bcrypt

How I can install golang.org/x/crypto/bcrypt?

My golang version is go version go1.4.2 gccgo

3 Answers 3

18

I found temporary solution.

Library golang.org/x/crypto/bcrypt has mirror on github.

Create folder src/golang.org/x/ into you GOPATH.

mkdir -p $GOPATH/src/golang.org/x/

Then clone crypto from github.

cd $GOPATH/src/golang.org/x/
git clone [email protected]:golang/crypto.git
17

I resolved it by using command:

go get golang.org/x/crypto/bcrypt

0
1 - cd /usr/local/go/src/
2 - sudo mkdir x
3 - cd x
4 - sudo git clone https://github.com/golang/crypto.git
5 - restart vscode 
1
  • 4
    Thank you for contributing an answer. Would you kindly edit your answer to to include an explanation of your code? That will help future readers better understand what is going on, and especially those members of the community who are new to the language and struggling to understand the concepts.
    – STA
    Mar 2, 2021 at 16:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.