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

rusnasonov
  • 752
  • 2
  • 12
  • 23

3 Answers3

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 git@github.com:golang/crypto.git
rusnasonov
  • 752
  • 2
  • 12
  • 23
17

I resolved it by using command:

go get golang.org/x/crypto/bcrypt

Viktor
  • 2,623
  • 3
  • 19
  • 28
Mayank Gupta
  • 1,779
  • 1
  • 13
  • 19
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 
  • 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 02 '21 at 16:57