ubuntu14.04 Installing the Go Language development environment via GVM

Source: Internet
Author: User

Recently used Ubuntu, so I'm going to install Golang to learn the hottest language of the moment.

It was originally intended to use sudo apt-get install Golang after installation found to be 1. 2. 1 not the latest version

So I searched the internet for a bit. Find something called GVM on git, Golang version Manager

Address: HTTPS://GITHUB.COM/MOOVWEB/GVM

1 First step if you're using Ubuntu, you need to install some libraries in advance.

Perform:

sudo apt-get install curl git mercurial make binutils bison gcc build-essential

2 If you are using a bash shell, you do not have to press any other shell, usually the bash shell

Perform:

Bash < < (curl-s-s-l Https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)

The 3 terminal shows that the installation is as follows

1 cloning from https://github.com/moovweb/gvm.git TO/HOME/C3T/.GVM2for  Install"/usr/lib/go"3 installed GVM v1. 0.22 4 5 restart your terminal session or to get started right away run 6  ' SOURCE/HOME/C3T/.GVM/SCRIPTS/GVM '

5 above line 5th tells you to restart the terminal execution

Source/home/c3t/.gvm/scripts/gvm

6 then we install a Golang, install the default version, the time is a bit long

Perform

Install

7 compile times wrong, temporarily do not know what reason

# Building C Bootstrap Tool.cmd/dist# Building compilers and Go bootstrap tool forHost, linux/Amd64.lib9libbiolibmachmisc/Pprofcmd/Addr2linecmd/Covcmd/Nmcmd/Objdumpcmd/Packcmd/Profcmd/cc/home/c3t/.gvm/gos/go1/src/cmd/cc/funct.c:infunction' dclfunct ':/home/c3t/.gvm/gos/go1/src/cmd/cc/FUNCT.C:273: -: error:iteration94uInvokes undefined behavior [-werror=aggressive-loop-optimizations] F->sym[o] =S; ^/home/c3t/.gvm/gos/go1/src/cmd/cc/FUNCT.C:272:2: Note:containing Loop for(o=0; O<sizeof (F-&GT;SYM); o++)  ^Cc1:all warnings being treated as Errorsgo tool dist:failed:GCC-wall-wno-sign-compare-wno-missing-braces-wno-parentheses-wno-unknown-pragmas-wno-switch-wno-comment-werror- Fno-common-ggdb-o2-c-m64-i/home/c3t/.gvm/gos/go1/include-i/home/c3t/.gvm/gos/go1/src/cmd/cc-O $WORK/funct.o/home/c3t/.gvm/gos/go1/src/cmd/cc/funct.c

8 so install with the following command, 1.4 is the latest version

Install 1.4



ubuntu14.04 Installing the Go Language development environment via GVM

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.