How to install latest version of Go on Ubuntu 16.04?

blov · · 457 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>I want to try Golang, but I&#39;m unsure which option to pick for installing it. I could just run <code>apt install golang</code> but the version in the repos is 1.6, a couple versions behind. There&#39;s also the option of <code>gccgo</code>, but I read that that tends to lag behind too.</p> <p>Does it matter terribly if I&#39;m using an older version? Or should I try to get the newer version? Is there a backports repo for it, or do I have to use the package from <a href="https://golang.org/dl/" rel="nofollow">here</a> (I&#39;d rather use something my package manager can handle if possible). Failing that, should I give installing from source a try? Do I need a Go compiler already working to compile it (since Golang is written in Go now)?</p> <p>Sorry for the noob questions. Possibly I&#39;m overthinking this, but I just want to make sure I&#39;ll be able to build <a href="http://limetext.org/" rel="nofollow">Lime Text</a>.</p> <hr/>**评论:**<br/><br/>mdwhatcott: <pre><p>Download the archive (<a href="https://storage.googleapis.com/golang/go1.8.1.linux-amd64.tar.gz" rel="nofollow">https://storage.googleapis.com/golang/go1.8.1.linux-amd64.tar.gz</a>) and extract it into /usr/local, creating a Go tree in /usr/local/go. For example:</p> <pre><code>tar -C /usr/local -xzf go$VERSION.$OS-$ARCH.tar.gz </code></pre> <p>From: <a href="https://golang.org/doc/install#tarball" rel="nofollow">https://golang.org/doc/install#tarball</a></p></pre>Mechanizoid: <pre><p>Thanks. ( ^m^ )</p></pre>Sir_not_sir: <pre><p><a href="https://www.reddit.com/r/golang/comments/69hcsj/updategolang_05_script_to_easily_fetch_and/" rel="nofollow">https://www.reddit.com/r/golang/comments/69hcsj/updategolang_05_script_to_easily_fetch_and/</a></p></pre>touristtam: <pre><p>I use this <a href="https://github.com/geosoft1/tools" rel="nofollow">https://github.com/geosoft1/tools</a>, personally.</p></pre>Mechanizoid: <pre><p>Ah, a Bash script. Thanks, I&#39;ll check it out. This may actually set up more for me than I actually need.</p></pre>touristtam: <pre><p>It does install LiteIDE as well.</p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

457 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传