go-legacy-win7 is a fork of the Go programming language that maintains support for Windows 7 and Windows Server 2008 R2, and allows for deprecated go get
behaviour. This project aims to provide a stable Go environment for users who need to support legacy Windows systems or prefer the traditional Go workflow.
Gopher image by Renee French, licensed under Creative Commons 4.0 Attribution licence.
-
Windows 7 and Windows Server 2008 R2 Support
While the official Go project has dropped support for Windows 7 and Windows Server 2008 R2, this fork maintains compatibility with these legacy Windows systems. -
Classic
go get
Behaviour
This fork allows for the deprecatedgo get
behaviour whenGO111MODULE
is set to "off" or "auto". This means:- In
GOPATH/src
,go get
andgo install
can operate inGOPATH
mode. - Outside of
GOPATH/src
, these commands can use module-aware mode when appropriate.
- In
-
Compatibility Notes
Please be aware that some newer Go features may not be fully compatible with Windows 7 or Windows Server 2008 R2. We try to maintain as much functionality as possible, but some limitations may exist.
Every release includes the following modifications:
- Switched back to RtlGenRandom from ProcessPrng, which breaks Win7/2008R2 (reverted 693def1)
- Added back LoadLibraryA fallback to load system libraries (reverted a17d959)
- Added back sysSocket fallback for socket syscalls (reverted 7c1157f)
- Added back Windows 7 console handle workaround (reverted 48042aa)
- Added back 5ms sleep on Windows 7/8 in (*Process).Wait (reverted f0894a0)
- Restored deprecated
go get
behavior for use outside modules (reverted de4d503) - Includes all improvements and bug fixes from the corresponding upstream Go release
The Windows binary provided here also supports Windows 7 and Windows Server 2008 R2
Binary distributions are available at the release page.
- Download the
go-legacy-win7-<version>.windows_<arch>.zip
file. - Extract the ZIP to
C:\
(or any preferred location). This will create ago-legacy-win7
folder. - Add the following to your system environment variables:
- Add
C:\go-legacy-win7\bin
(or your chosen path) to the systemPATH
. - Set
GOROOT
toC:\go-legacy-win7
(or your chosen path).
- Add
- Add the following to your user environment variables:
- Add
%USERPROFILE%\go\bin
to the userPATH
. - Set
GOPATH
to%USERPROFILE%\go
.
- Add
-
Download the appropriate
go-legacy-win7-<version>.<os>_<arch>.tar.gz
file.- For macOS:
go-legacy-win7-<version>.darwin_<arch>.tar.gz
- For Linux:
go-legacy-win7-<version>.linux_<arch>.tar.gz
- For macOS:
-
Extract the archive to
/usr/local
:sudo tar -C /usr/local -xzf go-legacy-win7-<version>.<os>_<arch>.tar.gz
-
Add the following to your shell configuration file:
- For bash, add to
~/.bash_profile
or~/.bashrc
- For zsh, add to
~/.zshrc
export GOROOT=/usr/local/go-legacy-win7 export GOPATH=$HOME/go export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
- For bash, add to
-
Apply the changes:
- For bash:
source ~/.bash_profile
orsource ~/.bashrc
- For zsh:
source ~/.zshrc
Note:
- On macOS Catalina and later, zsh is the default shell.
- On most Linux distributions, bash is the default shell.
- For bash:
After installation, verify the installation by opening a new terminal and running:
go version
To install from source, please follow the steps on the official website.
Feedback and issue reports are welcome, and we encourage you to open pull requests to contribute to the project. We appreciate your help!
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://go.dev/wiki/Questions for a list of places to ask questions about the Go language.