R
R
reus2016-12-11 23:35:44
linux
reus, 2016-12-11 23:35:44

Go Lang, how to properly install compiler on Ubuntu?

In general, I have trouble with go utilities .. When I try to compile the program (go install), an error occurs saying that GOBIN is not assigned. After compiling the build, I can’t run the binary (go/src/mayapp/main) in the console it says something like the application was not found, use apt-get. When I run " go run main.go" the computer hangs at all
.
/bin + export GOPATH=$HOME/work Threw
lines at the end of files export PATH=$PATH:/usr/local/go/bin + export GOPATH=$HOME/work
in ~/.profile; ~/.bashrc; /etc/profile
DOES NOT HELP =(
Tried to install a ready-made package: sudo apt-get istall golang (or something like that, but go1.6 was installed)
In general, how to properly install this fucking Go compiler so that you can work normally ???
I use Ubuntu 16.04 LTS (I have wine, but I don't want to use this crap other than photoshop/toys/video editing)

Answer the question

In order to leave comments, you need to log in

4 answer(s)
I
index0h, 2016-12-12
@index0h

wget https://storage.googleapis.com/golang/go1.7.4.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.7.4.linux-amd64.tar.gz
rm go1.7.4.linux-amd64.tar.gz
cat <<EOT >> ~/.bashrc
export GOROOT=/usr/local/go
export PATH=\$PATH:\$GOROOT/bin
export GOPATH=\$HOME/go
EOT

T
TyzhSysAdmin, 2016-12-12
@POS_troi

sudo add-apt-repository ppa:ubuntu-lxc/lxd-stable
sudo apt-get update
sudo apt-get install golang

https://github.com/golang/go/wiki/Ubuntu

R
rustler2000, 2016-12-27
@rustler2000

https://github.com/niemeyer/godeb :D

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question