GOLF(2gg)

πŸ“¦ version 601.4.41, in ubuntu questing

πŸ’– 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 $HOME directory 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 golf
  • install-arch-manjaro
  • install-debian
  • install-fedora-redhat-rocky-alma-centos-amazon-mageia
  • install-from-source-arch-manjaro
  • install-from-source-debian-ubuntu-raspbian
  • install-from-source-fedora-redhat-rocky-alma-centos-amazon-mageia
  • install-from-source-opensuse
  • install-in-any-folder-arch-manjaro
  • install-in-any-folder-debian-ubuntu-raspbian
  • install-in-any-folder-fedora-redhat-rocky-alma-centos-amazon-mageia
  • install-in-any-folder-opensuse
  • install-opensuse
  • install-raspbian
  • install-ubuntu
  • uninstall
  • See 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