Btw, the latest version of Go can be installed via DietPi-Software:
apt autopurge golang
dietpi-software install 188
This pulls the latest upstream build while the Debian package is several versions older .
As alternative to /home/pi you could use /home/dietpi. Latest Raspberry Pi OS doesn’t ship with the pi user anymore either, but one is offered to create a custom login user now on first boot. Something we wanted to do with DietPi as well when time allows.
Had now installed it again via DietPi-software 188 → but I still have go1.15.15 linux/arm.
Do i have to uninstall the old version before i install the 188 again?
by the way: root@Snowflake:~# tail -f /var/log/snowflake/snowflake.log
May 3 14:39:45 Snowflake snowflake: 2022/05/03 12:39:45 In the last 1h0m0s, there were 6 connections. Traffic Relayed ↑ 59 MB, ↓ 4 MB.
Great. Now I see that your second link contains this way of installing Go from upstream builds as well. There is also a step to add the Go paths. If you followed this, that care that paths are not set doubled: dietpi-software adds them for all users via /etc/bashrc.d/dietpi-go.sh, if I’m not mistaken (currently on the road).
I too wanted to set up the snowflake proxy on my fresh dietpi install. Ran into some difficulties with the go install via dietpi-software. It seems that like there could still be something amiss with the Go paths set via dietpi-software
I manually had to add the GOPATH to my .bashrc. This did work when running go directly from the cli. However, when trying to build the snowflake proxy, go was not found on my system.
My current workaround is to uninstall go and install golang via apt.
I set up a clean install once more and installed go via dietpi-software. Sadly no bueno on the paths being added on install.
Alright, this is after a fresh install, having only adguard&unbound, and snowflake build via golang running. I then proceeded to install go via ‘sudo dietpi-software install 188’.
$ echo “$PATH”
$ cat /etc/bashrc.d/go.sh
cat: /etc/bashrc.d/go.sh: Datei oder Verzeichnis nicht gefunden
I did notice this output on my screen after installation.
Step: Installing Go: Runtime environment and package installer
[ OK ] DietPi-Software | cd /tmp/DietPi-Software
[ OK ] DietPi-Software | curl -sSfL https://golang.org/dl/go1.19.2.linux-arm64.tar.gz -o go1.19.2.linux-arm64.tar.gz
[ OK ] DietPi-Software | tar xf go1.19.2.linux-arm64.tar.gz --one-top-level=/usr/local
[ OK ] DietPi-Software | rm go1.19.2.linux-arm64.tar.gz
export PATH="$PATH:/usr/local/go/bin" /etc/bashrc.d/go.sh
/boot/dietpi/dietpi-software: line 3204: /etc/bashrc.d/go.sh: No such file or directory
As mentioned in the PR, /mnt/dietpi_userdata/go isn’t used anymore on fresh installs, but projects/modules/crates are created in ~/go now by default, to align with official and Debian Go installs. But GOPATH can still be set of course to overwrite the default.