英文:
JSON2CSV install/setup issue (via Go)
问题
我正在尝试安装https://github.com/jehiah/json2csv。问题显然与我在Bash方面的新手状态有关。
系统:Ubuntu 14.04 LTS
加载指令:
$ go get github.com/jehiah/json2csv
Go已安装:
$ which go ==> /usr/bin/go
~/.bashrc设置:
export GOROOT=/usr/bin/go
export GOPATH=$HOME/projects/go
该软件包似乎已正确下载:
$ cd projects/go
$ tree
$ > bin > json2csv
> src > github.com
...
$ ls bin -l
$ > -rwxrwxr-x 1 <user> <user> 55400 Feb 5 13:57 json2csv
但是,即使在相同的目录中,$json2csv也无法被识别。我确定这是一个新手问题,但我还没有解决。有什么建议吗?
英文:
I'm attempting to install https://github.com/jehiah/json2csv. The problem is apparently tied to my noob status w.r.t. Bash.
System: Ubuntu 14.04 LTS
Load instruction:
$ go get github.com/jehiah/json2csv
Go is installed:
$ which go ==> /usr/bin/go
~/.bashrc setup:
export GOROOT=/usr/bin/go
export GOPATH=$HOME/projects/go
The package seems to download correctly:
$ cd projects/go
$ tree
$ > bin > json2csv
> src > github.com
...
$ ls bin -l
$ > -rwxrwxr-x 1 <user> <user> 55400 Feb 5 13:57 json2csv
But $json2csv isn't recognized, even from the same directory. I'm sure this is a noob problem, but I haven't cracked it yet. Suggestions?
答案1
得分: 2
将$GOPATH/bin添加到您的shell的PATH变量中,
对于bash:
export PATH=$GOPATH/bin:$PATH
英文:
Add $GOPATH/bin to your PATH variable in your shell,
for bash:
export PATH=$GOPATH/bin:$PATH
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论