wget https://dl.google.com/go/go1.20.linux-amd64.tar.gz
sudo tar -xvf go1.20.linux-amd64.tar.gz
sudo mv go /usr/local
Open /home/<USER>/.bashrc
and add it to the end of the file:
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
sudo apt-get install curl
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
# reload wsl
wsl --shutdown
nvm install 14.17.6
sudo apt-get update && sudo apt-get upgrade -y
sudo apt autoremove -y
sudo apt-get install gcc -y
gcc --version
sudo setcap CAP_NET_BIND_SERVICE=+eip /$gitea_dir$/gitea
git clone https://github.com/go-gitea/gitea.git
cd ./gitea
TAGS="bindata sqlite sqlite_unlock_notify" make build
GOOS=windows GOARCH=amd64 TAGS="bindata sqlite sqlite_unlock_notify" make build
LDFLAGS="-linkmode external -extldflags '-static' $LDFLAGS" GOOS=windows GOARCH=amd64 TAGS="bindata sqli
te sqlite_unlock_notify" make build
./gitea web