Ubuntu Linux Deployment under the Golang configuration environment, geek College without smelling the installation configuration is wrong, toss me several times, really a bit of a pit

Source: Internet
Author: User

To start according to the Geek College did not hear, get a few times do not, finally found is wrong, others told me this is the Mac VirtualBox is this, anyway, was not shallow.

Although the sudo apt install golang-go can be installed, it is not the latest version. The correct steps to install the latest version are as follows:

a , Required Documents

Golang:http://www.golangtc.com/download Second, Install Golang a) from the link given above to select the desired version of the Golang package (linux-amd64.tar.gz version, I am a 64-bit system, I installed the latest version is 1.7.4), download, the default is to ~/downloads directory. II) speaking Golang package decompression to the/usr/local path, the console command is as follows sudo tar-zxvf download after the installation package path and name-c/usr/local such as mine is: sudo tar-zxvf ~/downloads/ GO1.7.4.LINUX-AMD64.TAR.GZ-C/usr/local III) Create the Applications/go directory in the home directory, and then create three directories under this directory, respectively: Src,pkg,bin four) Setting the environment variables, Console commands and actions as follows sudo vim ~/.BASHRC here if Vim is not installed to first install Vim into the editing interface Shift+g jump to the end line, press O to insert a new line, enter the following export Goroot=/usr/local/goexport GOBIN  = $GOROOT/binexport gopath=~/applications/go export path= $PATH: After $GOBIN press ESC,:WQ save exit Four) make the configuration file effective source ~/.BASHRC Note: Do not use sudo here, sudo without the commandvi) TestingEnter go env to view the Golang environment variable, the normal output indicates the configuration is successful, and the environment variable settings can be verified. Enter the go version to view the release.

Ubuntu Linux Deployment under the Golang configuration environment, geek College without smelling the installation configuration is wrong, toss me several times, really a bit of a pit

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.