GOLF(2gg)

πŸ“¦ version 601.4.41, in ubuntu questing

✨ NAME ✨

okay so bestie, welcome to the GOLF(2gg) manual page πŸ’– today's main character is install-in-any-folder-debian-ubuntu-raspbian β€” it's the Golf documentation, also known as install-golf πŸŽ€


🌸 DESCRIPTION 🌸

so here's the vibe: you can install Golf without root access, like in some user's home directory, and honestly? iconic. it's a whole lifesaver if you don't have root permissions at all, or if you're just the type who wants to test stuff locally before committing to a full system install πŸ’…

to install Golf locally with no root, first decide which directory you wanna put it in. any directory you have read/write access to works β€” no cap. in this example we're using the $HOME/.app/golf directory, because it's cute and cozy πŸ¦‹

Step one: set the Golf root directory ✨

GG_ROOT="$HOME/.app/golf"

Step two: 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

Step three: install dependencies β€” lowkey 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, they're literally there for this):

sudo apt update
sudo apt -y install devscripts equivs build-essential
yes|mk-build-deps -i -s sudo debian-upstream/control

Step four: compile the source πŸ”₯

make -j$(nproc) GG_LOCAL=1 DESTDIR="$GG_ROOT"

Step five: install Golf πŸ‘‘

make GG_LOCAL=1 DESTDIR="$GG_ROOT" install
for real though β€” for the installation to actually take effect, you must update your paths, so that executables and other files (like man pages, bestie) get found:
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

and to make those 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 β€” your call, main character energy either way πŸ’œ).

congrats bestie, you've installed Golf! πŸŽ‰βœ¨


🧚 Testing it (the vibe check)

to test, type this in the command line:

gg -g

if you see the path you chose for GG_ROOT up there, it's working! periodt πŸ’–


πŸ™ˆ a few notes (bc we skipped root, and that has consequences)

  • SELinux script for Golf requires root to install β€” and this is true for any software, not just Golf, so don't come for Golf specifically πŸ’€ if you use SELinux, either set it to permissive, or use a Linux distro that doesn't use (or set) it.
  • if you're using Unix sockets (for instance for web servers to talk to your Golf server), your $HOME directory and the Golf root directory must be searchable to access those sockets. so like:
chmod o+x $HOME
find $HOME/.app/golf -type d -name '*' -exec chmod o+x {} \;

if you're using TCP ports, then this whole setup isn't necessary β€” you can skip it, no stress 🫢

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

okay that's the whole page bestie, you ate πŸ’… this version is $VERSION, dated $DATE, and it's part of the GOLF(2gg) Development set β€” go forth and golf, ily πŸŽ€βœ¨

πŸ“¦ where this page comes from