Go Language Environment Building

Source: Internet
Author: User
This is a created article in which the information may have evolved or changed.

This article explains how to configure a development environment for the Go language (Go language version 1.5) under Ubuntu 14.04.

First step: Install related environment components

Please enter the following command at the terminal: sudo apt-get install build-essential

Step two: Upload the relevant Go language installation package to the server

Can be uploaded using Xftp or WINSCP. After uploading to the relevant location, you need to note the decompression user rights.

Step three: Configure the Go language environment variable

First, use any text editor to open the. bashrc file in the home directory

If you are not sure where it is, you can also enter the following command directly at the terminal:

vim ~/.bashrc

Then go to the text editing interface, please append to the file at the end of the approximate content:

export GOROOT=GO语言解压的文件夹目录

export PATH=${PATH}:GO语言解压的文件夹目录

export GOPATH=工作目录

When the edits are complete, save to exit.

Then enter the following command at the terminal to make our settings effective:

source .bashrc

Then, after the terminal input command go, if you see the following information, the basic work has been completed!

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.