GOLF(2gg)
π GOLF(2gg) β the Development chapter, bestie π
okay so this is the GOLF(2gg) page from the Development section, and it's literally the "install Golf in literally any folder without root" tutorial. it's giving cozy, it's giving safe, it's giving you can totally do this. let's go π¦
β¨ NAME β¨
install-in-any-folder-arch-manjaro β Golf documentation (install-golf) π
πΈ DESCRIPTION πΈ
so like, installing Golf with no root access at all (say, into some user's home directory) is so useful when you don't have root permissions, or when you just wanna test things locally before committing to a full system install. vibe check: low stakes, high reward. π
to install Golf locally without root, first decide which directory you want it in. it can be any directory you have read/write access to. for this example we're gonna use the $HOME/.app/golf directory, iconic.
Set the Golf root directory:
GG_ROOT="$HOME/.app/golf"
Get wget and tar (some distros don't ship them by default β and yes, you do need root access for this part, or if not, ask your System Administrator to do these tasks):
sudo pacman -Sy --noconfirm wget tar
Download the Golf source code and extract it:
wget "https://github.com/golf-lang/golf/archive/refs/heads/main.tar.gz" -O main.tar.gz
tar xvfz main.tar.gz
cd golf-main
Install dependencies (again, you do need root access for this, or if not, ask your System Administrator to handle it):
sudo pacman -Sy --noconfirm debugedit
makepkg -s --noconfirm --nobuild --noextract
Then compile the source:
make -j$(nproc) GG_LOCAL=1 DESTDIR="$GG_ROOT"
And install Golf:
make GG_LOCAL=1 DESTDIR="$GG_ROOT" install
now, for the installation to actually take effect, you must update your paths (so executables and other files, like man pages, get found β no cap):
export GG_ROOT="$HOME/.app/golf"
export PATH="$GG_ROOT/usr/bin":$PATH
export C_INCLUDE_PATH="$GG_ROOT/usr/include":$C_INCLUDE_PATH
export MANPATH=$GG_ROOT/usr/share/man/:$MANPATH
mandb -u -c
To make these path settings permanent, add the above exports to the end of your $HOME/.bashrc file so it runs when you start a new session (or in any other file you execute before working with Golf). set it and forget it, periodt. β
You've installed Golf! π
To test, type in command line:
gg -g
If you see the path you chose for GG_ROOT above, it's working! slay. π
π«Ά a few notes π«Ά
because root access isn't used for this Golf installation, there's some stuff to know:
- SELinux script for Golf requires root to install (this is true for any software, not just Golf); if you use SELinux, either set it to permissive, or use a Linux distro that does not use (or set) it.
- if you're using Unix sockets (for instance for web servers to talk to your Golf server), your
$HOMEdirectory as well as the Golf root directory must be searchable to access those sockets:
chmod o+x $HOME
find $HOME/.app/golf -type d -name '*' -exec chmod o+x {} \;
- If you're using TCP ports, then this setup isn't necessary. lucky you π
Here's how to uninstall.
π SEE ALSO π
Install golfinstall-arch-manjaroinstall-debianinstall-fedora-redhat-rocky-alma-centos-amazon-mageiainstall-from-source-arch-manjaroinstall-from-source-debian-ubuntu-raspbianinstall-from-source-fedora-redhat-rocky-alma-centos-amazon-mageiainstall-from-source-opensuseinstall-in-any-folder-arch-manjaroinstall-in-any-folder-debian-ubuntu-raspbianinstall-in-any-folder-fedora-redhat-rocky-alma-centos-amazon-mageiainstall-in-any-folder-opensuseinstall-opensuseinstall-raspbianinstall-ubuntuuninstallSee all documentation
and that's the whole page, bestie π§ this one came from $VERSION and it's dated $DATE, brought to you by the Development girlies β see u in the next man page πβ¨ππ¦πΈ
π¦ where this page comes from
- ubuntu questing: golf 601.4.41-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms