英文:
Unable to install ipfs
问题
我正在尝试在Ubuntu上下载ipfs,以便与golang一起使用。
我使用以下命令:
go get -d github.com/ipfs/go-ipfs
但是这给我返回以下错误信息:
package github.com/ipfs/go-ipfs
imports runtime: cannot find package "runtime" in any of:
/home/userone/go/src/runtime (from $GOROOT)
/home/userone/gostuff/src/runtime (from $GOPATH)
我在文件~/.bashrc
的末尾添加了以下行:
export GOPATH=$HOME/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
我正在使用Ubuntu 16.04,并使用以下命令安装了golang:
sudo aptitude install golang-go git
为什么会出现这个错误信息?
英文:
I'm trying to download ipfs on ubuntu so I can use it with golang.
I'm using the following command:
go get -d github.com/ipfs/go-ipfs
But that gives me the following error message:
package github.com/ipfs/go-ipfs
imports runtime: cannot find package "runtime" in any of:
/home/userone/go/src/runtime (from $GOROOT)
/home/userone/gostuff/src/runtime (from $GOPATH)
I have added the following lines at the end of the file ~/.bashrc
export GOPATH=$HOME/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
I am using Ubuntu 16.04 and I installed golang using the following command
sudo aptitude install golang-go git
Why am I getting that error message?
答案1
得分: 1
安装说明可以在README.md中找到,链接为https://github.com/ipfs/go-ipfs#install
要从源代码编译,请执行以下操作:
$ go get -u -d github.com/ipfs/go-ipfs
$ cd $GOPATH/src/github.com/ipfs/go-ipfs
$ make install
英文:
Install instructions can be found at the README.md https://github.com/ipfs/go-ipfs#install
To compile from source, do:
$ go get -u -d github.com/ipfs/go-ipfs
$ cd $GOPATH/src/github.com/ipfs/go-ipfs
$ make install
答案2
得分: 1
只需澄清一切。以下是你需要做的唯一事情(不要设置GOROOT):
- 设置环境
export PATH=$PATH:/usr/local/go/bin
export PATH=$PATH:$GOPATH/bin
- 从源代码安装IPFS
$ go get -u -d github.com/ipfs/go-ipfs
$ cd $GOPATH/src/github.com/ipfs/go-ipfs
$ make install
英文:
Just to make everything clear. Following are the only things you need to do( don't set GOROOT)
- Set environment
> export PATH=$PATH:/usr/local/go/bin<br> export PATH=$PATH:$GOPATH/bin
- Install IPFS from source
> $ go get -u -d github.com/ipfs/go-ipfs
>
> $ cd $GOPATH/src/github.com/ipfs/go-ipfs<br>
> $ make install
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论