GOLF(2gg)
β¨ NAME β¨
hi bestie!! okay so this whole page is GOLF(2gg) β it lives in the Development corner of the manual, and it's your girl's Golf documentation. the official name of this whole vibe is:
install-in-any-folder-fedora-redhat-rocky-alma-centos-amazon-mageia β also known as install-golf π
yeah that name is a mouthful, we know, but she's iconic and she knows it π
πΈ DESCRIPTION πΈ
okay so listen: installing Golf with no root access at all (like, putting it right in a user's home directory) is genuinely so helpful. it's the move when you have zero root permissions, or honestly when you just wanna test it locally before you commit and install Golf on your actual system. vibe check passed β¨
to install Golf locally without root access, first you gotta decide which directory you want it in. it can be any directory you have read/write access to β literally any. for this example we're using the $HOME/.app/golf directory π
Set the Golf root directory:
GG_ROOT="$HOME/.app/golf"
next up, get wget and tar (some distros just don't ship with them by default π and heads up β you do need root access for this part, or if you don't have it, ask your System Administrator to do these tasks for you):
sudo dnf install -y 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 the dependencies (again bestie, you do need root access for this, or ask your System Administrator to perform these tasks):
sudo dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm || true
sudo dnf install -y rpmdevtools
sudo dnf builddep -y golf.spec
Then compile the source:
make -j$(nproc) GG_LOCAL=1 DESTDIR="$GG_ROOT"
And install Golf:
make GG_LOCAL=1 DESTDIR="$GG_ROOT" install
okay so for the installation to actually take effect, you MUST update your paths (that's how your executables and other files, like man pages, get found at all):
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, just add all those exports to the end of your $HOME/.bashrc file so it runs every time you start a new session (or honestly, in any other file you execute before working with Golf β whatever works for you π«Ά).
if you want to have SELinux enabled, you must have root access to set up Golf for SELinux β or if not, ask your System Administrator to perform this. otherwise, you must disable SELinux. no cap, that's the deal π
sudo $GG_ROOT/usr/lib/golf/selinux/selinux.setup
You've installed Golf!! ππ periodt.
to test it, type this into the command line:
gg -g
if you see the path you chose for GG_ROOT above β it's working! ate and left no crumbs π
β οΈ real talk: if you're using Unix sockets (like, for instance, for web servers to talk to your Golf server), your $HOME directory as well as the Golf root directory must be searchable to access those sockets. if you're using TCP ports instead of sockets, then this isn't necessary, so you can skip this π
chmod o+x $HOME
find $HOME/.app/golf -type d -name '*' -exec chmod o+x {} \;
here's how to uninstall. (yes that's it, that's the whole line β she said what she said π)
π¦ 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 lil masterpiece is version $VERSION, dated $DATE, and it's living under GOLF(2gg) forever and ever π slay, go install your Golf, and don't forget to hydrate β¨π¦πΈ
π¦ 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