SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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)
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)
Hi sairum,
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
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?
Do you put your custom go path at the beginning or end of PATH? Can you show us your golang.sh?
/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!).
Thanks, I hope that this change does not bring consequences.
No, not a sorcerer (wouldn't a sorcerer know if he is one?)
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.
No, not a sorcerer (wouldn't a sorcerer know if he is one?)
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.