Go language. Raspberry Pi. Environment Installation and testing

Source: Internet
Author: User

Go is a programming language developed by Google that is statically strong-typed, compiled, and styled, and has a garbage collection function. To facilitate search and identification, it is sometimes referred to as Golang

Record how to install locales on Raspberry Pi

First step: Download the installation package

HTTPS://golang.org/dl/

Here we are going to install in Raspberry Pi, so download the version shown

Step Two: Install

Extract the downloaded source package to the/usr/local directory

sudo tar-c/usr/local/-xzf go1.9.2.linux-armv6l.tar.gz

Add the/usr/local/go/bin directory to the PATH environment variable:

Export path= $PATH:/usr/local/go/bin

Note: Under MAC system you can use the. Pkg end of the installation package directly double-click to complete the installation, the installation directory under/usr/local/go/.

The third step: write a Hello World

Vim Hello.go

The code reads as follows:

" FMT " Func Main () {        fmt. Println ("HelloWorld");}

Try running it.

Operation Result:

Go language. Raspberry Pi. Environment Installation and testing

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.