How to update golang on codeanywhere.com with Ubuntu 14.04?
The default container uses the version from Ubuntu repos, instead of golang PPA.
As of writing it's 1.6 and the newest version is 1.9.
How to update golang on codeanywhere.com with Ubuntu 14.04?
The default container uses the version from Ubuntu repos, instead of golang PPA.
As of writing it's 1.6 and the newest version is 1.9.
On
(can't comment yet) Just an additional information, the steps in Paweł Prażak's answer work when you run on a Blank Container. If you run them on a Go predefined stack it won't update.
I also recommend to change the GOPATH value to your workspace, running
export GOPATH=$HOME/go
Then run go env to check if the values are correctly updated.
Thanks for the answer by the way, Paweł!
On
You can easily install the latest golang release in the container by using this script:
git clone https://github.com/udhos/update-golang
cd update-golang
sudo ./update-golang.sh
Full details: https://github.com/udhos/update-golang
Create and new
Blank Containerwith Ubuntu:Connect to the container with SSH.
Follow the instructions on the official wiki.
First install the
add-apt-repositorysupport:Now install the recent version of golang (refer to the wiki for up to date instructions):
Make sure to put the binary on
PATH, e.g.:Now the newer version should be available:
Add
$GOPATHpointing to theworkspaceand add$GOPATH/binto$PATHin~/.profile:Apply the new
~/.profile:Also
makeis missing, if you need it: