<p>I'm trying to download ipfs on ubuntu so I can use it with golang.</p>
<p>I'm using the following command:</p>
<pre><code>go get -d github.com/ipfs/go-ipfs
</code></pre>
<p>But that gives me the following error message:</p>
<pre><code>package github.com/ipfs/go-ipfs
imports runtime: cannot find package "runtime" in any of:
/home/oshirowanen/go/src/runtime (from $GOROOT)
/home/oshirowanen/gostuff/src/runtime (from $GOPATH)
</code></pre>
<p>I have added the following lines at the end of the file <code>~/.bashrc</code></p>
<pre><code>export GOPATH=$HOME/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
</code></pre>
<p>I am using Ubuntu 16.04 and I installed golang using the following command</p>
<pre><code>sudo aptitude install golang-go git
</code></pre>
<p>Why am I getting that error message?</p>
<hr/>**评论:**<br/><br/>dlq84: <pre><p>"/home/oshirowanen/go/src/runtime (from $GOROOT)"</p>
<p>That looks weird, are you sure you have your GOROOT there? try unsetting GOROOT, because it usually have a good default (/usr/lib/go). Usually you only need to set GOPATH (up until 1.8)</p></pre>dlq84: <pre><p>Did my suggestion work? People appreciate feedback when they try to help, and if it did work a simple thank you shouldn't be too much to expect.</p></pre>oshirowanen: <pre><p>I appreciate the help, but unfortunately, I've not had the chance to try this out yet.</p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传