Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

Not able to install it correctly #847

Closed
ivaylopivanov opened this issue Jul 18, 2017 · 15 comments
Closed

Not able to install it correctly #847

ivaylopivanov opened this issue Jul 18, 2017 · 15 comments

Comments

@ivaylopivanov
Copy link

~ $ go get -u github.com/golang/dep/cmd/dep
~ $ dep init

No command 'dep' found, did you mean:
Command 'rep' from package 'rep' (universe)
Command 'delp' from package 'fp-utils-2.6.2' (universe)
Command 'dwp' from package 'binutils' (main)
Command 'iep' from package 'emboss' (universe)
Command 'xep' from package 'pvm-examples' (universe)
Command 'dp' from package 'speech-tools' (universe)
dep: command not found

~ $ go version
go version go1.8 linux/amd64


@ivaylopivanov
Copy link
Author

If we need to do any aliasing with the binary, it will be good to be mentioned in the doc.

@matjam
Copy link
Contributor

matjam commented Jul 18, 2017

You will need to install the binary:

go get github.com/golang/dep
cd $GOPATH/src/github.com/golang/dep
go install ./...

something like that

@nijaru
Copy link

nijaru commented Jul 18, 2017

go get installs packages it gets unless a flag is provided. [0]
"For convenience, add the workspace's bin subdirectory to your PATH" [1]

You should have dep installed after running go get, but it needs to be in your path for you to run it anywhere.

[0] https://golang.org/cmd/go/#hdr-Download_and_install_packages_and_dependencies
[1] https://golang.org/doc/code.html#GOPATH

@ibrasho
Copy link
Collaborator

ibrasho commented Jul 19, 2017

@ivaylopivanov What's the output of go env and your $PATH?

@matjam This is a shortcut: go get github.com/golang/dep/cmd/dep

It'll fetch github.com/golang/dep and install the github.com/golang/dep/cmd/dep package (which compiles dep)

@matjam
Copy link
Contributor

matjam commented Jul 19, 2017

it didn't work for me until I did go install ./...

go figure?

@zkanda
Copy link
Contributor

zkanda commented Jul 19, 2017

@ivaylopivanov is your $GOPATH/bin in your $PATH?

@ivaylopivanov
Copy link
Author

Thanks @zkanda, I didn't have it as part of the $PATH.

@5-digits
Copy link

5-digits commented Jan 31, 2018

i have the same problem on windows
'dep' is not recognized as an internal or external command

  • How to install it to be global command called everywhere .

@losintikfos
Copy link

To resolve this install dep:

go get github.com/golang/dep/cmd/dep

And then add $GOPATH/bin to $PATH.

Example:

export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin

@5-digits
Copy link

5-digits commented Feb 1, 2018

@losintikfos Thanks, problem solved

@sdboyer
Copy link
Member

sdboyer commented Feb 1, 2018

it is generally preferred that you use released versions (see github releases tab) rather than tip. we don't guarantee the stability of tip.

@generalomosco
Copy link

This is what finally worked for me!

export GOBIN="$HOME/_golangPath01/bin"
export GOPATH="$HOME/_golangPath01/src"
export PATH=$PATH:/usr/local/go/bin:$GOBIN

go get github.com/golang/dep
go get github.com/golang/dep/cmd/dep
cd $GOPATH/src/github.com/golang/dep
go install ./...

@SantoshDhirwani
Copy link

@generalomosco Thanks. Your solution worked for me as well :)

@sylvanasbeta
Copy link

@generalomosco Thanks. Your solution also worked for me :)

@barakat-abweh
Copy link

a small trick can help
ln -s /home/"your username"/go/bin/dep /usr/bin/

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

No branches or pull requests