This is a creation in Article, where the information may have evolved or changed.
Modifying a software source
My 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#大连东软信息学院源 (North User) #deb http://Mirrors.neusoft.edu.cn/raspbian/raspbian/wheezy Main contrib Non-free RPI#重庆大学源 (Midwest User) #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 ' apt-get source ' #deb-src http://< Span style= "color: #008000;" >mirror.ox.ac.uk/sites/archive.raspbian.org/archive/raspbian/wheezy Main contrib non-free RPI
1 Modifying Sources.list"Backup" Back up the source list before modifying sources.list cd/etc/apt CP sources.list Sources.list_backModify sudo vim sources.listFor example, using the Dalian Neusoft Information Institute software source image, the following changes:
Deb Http://mirrors.neusoft.edu.cn/raspbian/raspbian wheezy main contrib non-free RPI
Remember the format must be correct!!!!!!
2 updating software sources and software# Update the software source sudo apt-get update# Update Software sudo apt-get upgrade
Apt-cache Search string//Find the appropriate package in the Source software list
sudo apt-cache search Golanggolang-go programming language Compiler- metapackagegolang-dbg-go programming LAN guage Compiler- debug Filesgolang-doc-go programming language Compiler- documentationgolang-go-for GN U emacsgolang-src-go programming language compiler-source files
Then install Apt-get installed Golang-go
The latest version of the current Raspberry Pi is 1.0.2 (the official Golang is the latest version is 1.4.2) I got the code on the Raspberry Pi but could not compile, prompted not to set the GOROOT environment variable, cannot find ~/go/include/u.h