分享
  1. 首页
  2. 文章

raspberry安装go

scotth · · 10044 次点击 · · 开始浏览
这是一个创建于 的文章,其中的信息可能已经有所发展或是发生改变。

修改软件源

我的source.list

#替换国内源
#中山大学
deb http://mirror.sysu.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi

#中国科学技术大学
deb http://mirrors.ustc.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi

#清华大学
deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi

#华中科技大学
#deb http://mirrors.hustunique.com/raspbian/raspbian/ wheezy main contrib non-free rpi
#Arch Linux ARM http://mirrors.hustunique.com/archlinuxarm/ wheezy main contrib non-free rpi

#大连东软信息学院源(北方用户)
#deb http://mirrors.neusoft.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi

#重庆大学源(中西部用户)
#deb http://mirrors.cqu.edu.cn/Raspbian/raspbian/ wheezy main contrib non-free rpi

#新加坡国立大学
#deb http://mirror.nus.edu.sg/raspbian/raspbian wheezy main contrib non-free rpi

#牛津大学
#deb http://mirror.ox.ac.uk/sites/archive.raspbian.org/archive/raspbian/ wheezy main contrib non-free rpi

#韩国KAIST大学
#deb http://ftp.kaist.ac.kr/raspbian/raspbian/ wheezy main contrib non-free rpi


#官网的源 #deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi # Uncomment line below then 'apt-get update' to enable 'apt-get source' #deb-src http://mirror.ox.ac.uk/sites/archive.raspbian.org/archive/raspbian/ wheezy main contrib non-free rpi
1 修改sources.list
【备份】
在修改之前先把源列表备份,然后再修改sources.list
cd /etc/apt
cp sources.list sources.list_back
【修改】
sudo vim sources.list
例如使用大连东软信息学院软件源镜像,修改之后的内容如下:

deb http://mirrors.neusoft.edu.cn/raspbian/raspbian wheezy main contrib non-free rpi

记得格式一定要正确!!!!!!
2 更新软件源和软件
# 更新软件源
sudo apt-get update
# 更新软件
sudo apt-get upgrade

apt-cache search string //在源软件列表中查找相应的软件包

pi@raspberrypi /etc/apt $ sudo apt-cache search golang
golang - Go programming language compiler - metapackage
golang-dbg - Go programming language compiler - debug files
golang-doc - Go programming language compiler - documentation
golang-go - Go programming language compiler
golang-mode - Go programming language - mode for GNU Emacs
golang-src - Go programming language compiler - source files

然后安装apt-get install golang-go

目前树莓派上的最新版本是1.0.2 (官方golang 是最新版本是1.4.2) 我下了代码在树莓派上却无法编译,提示没有设置GOROOT环境变量,无法找到 ~/go/include/u.h




有疑问加站长微信联系(非本文作者)

本文来自:博客园

感谢作者:scotth

查看原文:raspberry安装go

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

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

用户登录

没有账号?注册
(追記) (追記ここまで)

今日阅读排行

    加载中
(追記) (追記ここまで)

一周阅读排行

    加载中

关注我

  • 扫码关注领全套学习资料 关注微信公众号
  • 加入 QQ 群:
    • 192706294(已满)
    • 731990104(已满)
    • 798786647(已满)
    • 729884609(已满)
    • 977810755(已满)
    • 815126783(已满)
    • 812540095(已满)
    • 1006366459(已满)
    • 692541889

  • 关注微信公众号
  • 加入微信群:liuxiaoyan-s,备注入群
  • 也欢迎加入知识星球 Go粉丝们(免费)

给该专栏投稿 写篇新文章

每篇文章有总共有 5 次投稿机会

收入到我管理的专栏 新建专栏