Reputation: 80186
The go get -v gopkg.in/urfave/cli.v2
is hanging after printing the following output. I could install other packages though. How to debug the root cause for this?
This has been hanging for over 6 hours. Had to come out of this by pressing cntrl+c.
$go get -v -insecure gopkg.in/urfave/cli.v2
Fetching https://gopkg.in/urfave/cli.v2?go-get=1
Parsing meta tags from https://gopkg.in/urfave/cli.v2?go-get=1 (status code 200)
get "gopkg.in/urfave/cli.v2": found meta tag main.metaImport{Prefix:"gopkg.in/urfave/cli.v2", VCS:"git", RepoRoot:"https://gopkg.in/urfave/cli.v2"} at https://gopkg.in/urfave/cli.v2?go-get=1
gopkg.in/urfave/cli.v2 (download)
Upvotes: 7
Views: 11123
Reputation: 38
The nuclear option worked for me (deleting my entire $GOPATH directory and just reinstalling everything). A network issue while installing a specific package at some point caused a broken dependency and as a result go get was not working for it. This was not a big deal for me as I did not have a lot in my GOPATH, you could be more clinical about it if my approach would not be good for you.
# rm -rf go
Upvotes: 0
Reputation: 80186
It turns out there is no source code repo at https://gopkg.in/urfave/cli.v2. I had to follow @Louis suggestion of cloning the repo myself
mkdir -p $GOPATH/src/gopkg.in/urfave
cd $GOPATH/src/gopkg.in/urfave
git clone https://github.com/urfave/cli -b v2 cli.v2
NOTE: Opened an issue for the author https://github.com/urfave/cli/issues/591
Upvotes: 0
Reputation:
Most likely a networking issue. We had this phenomenon while the connection to our ISP experienced package loss.
Since go get
uses git, you could manually clone the repository and see what git
tells you:
$ git clone --verbose https://gopkg.in/urfave/cli.v2
Upvotes: 2