Cobra: -bash: cobra: command not found

Created on 29 Apr 2016  路  5Comments  路  Source: spf13/cobra

On MacOSX, I followed the README file, but could not use the cobra line command.
For example :

cobra init github.com/spf13/newAppName

results in :
-bash: cobra: command not found

Most helpful comment

step1. gedit ~/.zshrc
step2. paste below 3 lines on file

export GOPATH=$HOME/go
export GOBIN=$GOPATH/bin
export PATH=${PATH}:$GOBIN

step3.
source ~/.zshrc
step4.
restart Terminal

All 5 comments

Ok, I needed to add in the PATH : $GOPATH/bin

Am getting the same issue. what is the solution to resolve this one?
Thanks in advance.

have you mange to fix the problem? i'm getting the same error

@pruse2402 @bjarkarim if you guys still have this error, go to your home directory and edit your .bashrc (or .zshrc if you're using zsh like I do) and add your $GOPATH/bin to the list. In my case its 'GOPATH=$HOME/go' so I had to adjust my path 'PATH="entry1:entry2:$HOME/go/bin". That might explain a bit better what @mdaymard already said.

step1. gedit ~/.zshrc
step2. paste below 3 lines on file

export GOPATH=$HOME/go
export GOBIN=$GOPATH/bin
export PATH=${PATH}:$GOBIN

step3.
source ~/.zshrc
step4.
restart Terminal

Was this page helpful?
0 / 5 - 0 ratings

Related issues

umbynos picture umbynos  路  5Comments

andygrunwald picture andygrunwald  路  6Comments

joernott picture joernott  路  6Comments

pjbgf picture pjbgf  路  5Comments

eine picture eine  路  5Comments