旧行李 2013-07-05 01:50 采纳率: 25%
浏览 392
已采纳

如何在 Ubuntu 精确版中安装 Go 的当前版本

Running sudo apt-get install golang-stable, I get Go version go1.0.3. Is there any way to install go1.1.1?

转载于:https://stackoverflow.com/questions/17480044/how-to-install-the-current-version-of-go-in-ubuntu-precise

  • 写回答

13条回答 默认 最新

  • larry*wei 2013-07-10 09:18
    关注

    I found a repo that has the latest versions: https://launchpad.net/~duh/+archive/golang/+packages. So basically do:

    sudo apt-get install python-software-properties  # 12.04
    sudo add-apt-repository ppa:duh/golang
    sudo apt-get update
    sudo apt-get install golang
    

    To confirm:

    go version
    

    which outputs in my case (Ubuntu precise)

    go version go1.1.1 linux/amd64
    

    From there just export the settings you're gonna need to bash_rc or equivalent:

    export GOROOT=/usr/lib/go
    export GOBIN=/usr/bin/go
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(12条)

报告相同问题?

悬赏问题

  • ¥50 分布式追踪trace异常问题
  • ¥15 人在外地出差,速帮一点点
  • ¥15 如何使用canvas在图片上进行如下的标注,以下代码不起作用,如何修改
  • ¥15 Windows 系统cmd后提示“加载用户设置时遇到错误”
  • ¥50 vue router 动态路由问题
  • ¥15 关于#.net#的问题:End Function
  • ¥15 无法import pycausal
  • ¥15 weditor无法连接模拟器Local server not started, start with?
  • ¥20 6-3 String类定义
  • ¥15 嵌入式--定时器使用