• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to install Go programming language on debian 8.6

{{postValue.id}}

How to install Go programming language on debian 8.6

Go, is a modern, open-source programming language developed by Google. Increasingly popular for many applications, Go takes a minimalist approach to development and makes it easy to build reliable and efficient software. The installation process is explained as follows.

Installation process

Now you should first download the Go tar file.

root@linuxhelp:~# curl -O https://storage.googleapis.com/golang/go1.7.4.linux-amd64.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 80.1M  100 80.1M    0     0  1115k      0  0:01:13  0:01:13 --:--:-- 1140k

Then extract the tar file.

root@linuxhelp:~# tar xvf go1.7.4.linux-amd64.tar.gz
go/
go/AUTHORS
go/CONTRIBUTING.md
go/CONTRIBUTORS
go/LICENSE
go/PATENTS
go/README.md
go/VERSION
go/api/
go/api/README
go/api/except.txt
go/api/go1.1.txt
go/api/go1.2.txt
go/api/go1.3.txt
go/api/go1.4.txt
go/api/go1.5.txt
go/api/go1.6.txt
go/api/go1.7.txt
.
.
.
go/test/uintptrescapes.dir/a.go
go/test/uintptrescapes.dir/main.go
go/test/uintptrescapes.go
go/test/uintptrescapes2.go
go/test/undef.go
go/test/utf.go
go/test/varerr.go
go/test/varinit.go
go/test/writebarrier.go
go/test/zerodivide.go

Now you can move the extracted directory to " /usr/local" directory.

root@linuxhelp:~# mv go /usr/local

Set environment variable path on profile file like below.

root@linuxhelp:~# nano ~/.profile

In profile settings, set the environment variables. Type the lines and save it.

export GOPATH=$HOME/work
export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin

Now reload the profile file.

root@linuxhelp:~# source ~/.profile

Create directory for projects.

root@linuxhelp:~# mkdir $HOME/work

Then create project directory.

root@linuxhelp:~# mkdir -p work/src/my_project/hello

Create sample project execution file like below.

root@linuxhelp:~# nano ~/work/src/my_project/hello/hello.go

package main
import " fmt" 
func main() {
    fmt.Printf(" Hello, World!
" )
}

Next compile your project by using go install command.

root@linuxhelp:~# go install my_project/hello

Now run your project.

root@linuxhelp:~# hello
Hello, World!

Tags:
benjamin
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

how to download the package for GO in terminal?

A

download the package by below command
# curl -O https://storage.googleapis.com/golang/go1.7.4.linux-amd64.tar.gz

Q

where to download its stable releases for GO?

A

use the below link to download the latest version
https://storage.googleapis.com/golang/ => do checkout this link

Q

which command to compile the go project?

A

compile your project by using go install command.
# go install my_project/hello

Q

what is the purpose of installing the Go programming language on debian?

A

Go, is a modern, open-source programming language developed by Google. Increasingly popular for many applications, Go takes a minimalist approach to development and makes it easy to build reliable and efficient software

Q

what is the next step after downloading the GO package?

A

After downloading the package and then need to extract the file which is compressed

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help keel johnston ?
Unhide the folders on windows Explorer

Give any solutions to unhide folder using command prompt?

forum3

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.