Monday, May 6, 2024
 Popular · Latest · Hot · Upcoming
15
rated 0 times [  15] [ 0]  / answers: 1 / hits: 144680  / 3 Years ago, tue, june 22, 2021, 5:51:51

I have Ubuntu 14.4.03. The default golang version which came with it was 1.2.1. I would like to update golang to 1.4 or higher.



After searching I found the way to do this would be to first delete current go installation and then re-install the new version.



I found the following go installation files in the following directory:



/usr/share/go
/usr/share/go/src/cmd/go
/usr/share/go/src/pkg/go
/usr/lib/go
/ur/lib/go/pkg/linux_amd64/go
/ur/lib/go/pkg/linux_amd64_race/go
/usr/bin/go


Which directory contains what? Which ones should I delete? What should be the location of new installation? It seems /usr/local is more normal. Then how come Ubuntu default is as above?



What would be the procedure to install a new version og golang?



Thanks.


More From » updates

 Answers
3

First remove your current golang installation with this command, you don't need to manually remove files installed by apt-get,



sudo apt-get purge golang


For an easy install of golang 1.4 you can use this PPA



sudo add-apt-repository ppa:evarlast/golang1.4
sudo apt-get update


Now you can use



sudo apt-get install golang


This will install version 1.4, here is a link to the PPA.


[#16920] Thursday, June 24, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
mentpengu

Total Points: 148
Total Questions: 114
Total Answers: 119

Location: Anguilla
Member since Sun, Aug 7, 2022
2 Years ago
;