Do you know: The way Linux installs the go language

Source: Internet
Author: User
Tags install go
This is a creation in Article, where the information may have evolved or changed. Today toss a day of VPS, installed HHVM, FTP, installed not successful VPN.

Go language is also installed to complete, but Midway also encountered some problems, mainly English problems, so that computer learning, ah, must first learn English.


To the golang.org, as a technology official website, incredibly by the wall. Celestial will not all Google's things to the wall off it? Oh.

First of all, it must be the download resource bundle, the link is summarized in http://www.golangtc.com/download, I use http://www.golangtc.com/static/go/ Go1.4beta1.linux-amd64.tar.gz This version of the image address.


Follow the instructions CD into the/usr/local directory, and then execute wget-c http://www.golangtc.com/static/go/go1.4beta1.linux-amd64.tar.gz Download the resource bundle from the command line. Wget is a download tool, and-C is a parameter that supports the continuation of a breakpoint.

After the download is complete, unzip tar-c/usr/local-xzf go1.4beta1.linux-amd64.tar.gz

Then CD into the GO/SRC directory, execute the./all.bash command to install go, the installation may prompt error Gcc:command not found, meaning that there is no gcc this command, so if there is a prompt error, you must perform the installation Gcc,sudo Apt-get Install gcc (my is Ubuntu, if it is centos, it should be Yum), after the installation is complete, then do it again./all.bash.


This is the installation of the Go language, but also to set the path, if you do not set the path, the execution of Go will prompt Go:command not found, the hint means that there is no command line. This is because the path is not set yet.

The way to set the path is

Vi/etc/profile or VI $HOME/.profile, go in the first line to add a row of export path= $PATH:/usr/local/go/bin, you can.


Then make the profile effective: source $HOME/.profile

At this point, OK, very simple is not, hey


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.