GoLang
hi friends,
Slackware 15.0 has version GO 1.16.5 but I have version 1.17.6 in another directory. even though my version is included in /etc/profile.d/golang.sh, it always takes the system one. Where can I change this? |
Did you re-login after installing the newer go?
|
AFAIK Slackware 15.0 does not ship any Go binaries. Either you installed them via SlackBuilds or you used AlienBob's binary package which is currently at version 1.17.5. If you have 1.16.15 it's because you installed it previously. Either remove that package or upgrade it to 1.17.5.
PS: Slackware provides Go through the Gnu compiler (gccgo) |
Quote:
My Slackware installation is clean, I have never installed GO(alienbob or any 3rd party repository). I have always downloaded GO and put it in a path on my backup disk and add it to /etc/profile.d/golang.sh And I'm surprised to see in /usr/bin/go terminal: go version go1.16.5 gccgo (GCC) 11.2.0 linux/amd64 |
Quote:
/usr/bin/go is provided by gcc-go (a stock Slackware package), as already pointed out by sairum. I suppose you could "removepkg gcc-go" if you want to get rid of GCC's go implementation (I didn't try this!). |
Quote:
Maybe the system is reading GOROOT/GOPATH and mine is GO_HOME. |
Quote:
|
Quote:
|
Quote:
export GOROOT=/mnt/Backup/Tools/go export PATH="$PATH:$GOROOT/bin" |
Quote:
Code:
export GOROOT=/mnt/Backup/Tools/go |
Quote:
|
Quote:
Thanks, I hope that this change does not bring consequences. |
Quote:
Because with the current version of Slackware 15 RC, I had no problems with Go previously |
Quote:
The consequence is that any binary in /mnt/Backup/Tools/go/bin has preference over the rest of your PATH, like /usr/bin, /bin, etc. Assuming you only have go tools in /mnt/Backup/Tools/go/bin and don't do anything silly like put an executable named "bash" in /mnt/Backup/Tools/go/bin/ you'll be fine. This preference ordering is why /usr/local/bin comes before /usr/bin in Slackware's default PATH: it assumes anything in /usr/local/bin should take preference over anything in /usr/bin. |
Another option would be to rebuild http://slackware.uk/slackware/slackw.../source/d/gcc/
This is correct? Quote:
|
All times are GMT -5. The time now is 12:36 AM. |