JSON2CSV安装/设置问题(通过Go)

huangapple go评论118阅读模式
英文:

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 ==&gt; /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
$ &gt; bin &gt; json2csv
  &gt; src &gt; github.com
        ...
$ ls bin -l
$ &gt; -rwxrwxr-x 1 &lt;user&gt; &lt;user&gt; 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

huangapple
  • 本文由 发表于 2015年2月6日 04:09:28
  • 转载请务必保留本文链接:https://go.coder-hub.com/28353111.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定