Install in any folder arch manjaro
Installing Golf without root access (for instance in a home directory of a user) can be helpful if you have no root permissions, or if you just want to test locally before installing Golf on your system.
To install Golf locally without root access, first decide which directory you'd like to install it. It can be any directory you can read/write access to. In this case, we'll use $HOME/.app/golf directory as an example.
Set the Golf root directory:
GG_ROOT="$HOME/.app/golf"
Copied!
Get wget and tar (some distros don't have it by default; you do need root access for this, or if not, ask your System Administrator to perform these tasks):
sudo pacman -Sy --noconfirm wget tar
Copied!
Download Golf source code and extract it:
Install dependencies (you do need root access for this, or if not, ask your System Administrator to perform these tasks):
sudo pacman -Sy --noconfirm debugedit
makepkg -s --noconfirm --nobuild --noextract
Copied!
Then compile the source:
make -j$(nproc) GG_LOCAL=1 DESTDIR="$GG_ROOT"
Copied!
And install Golf:
make GG_LOCAL=1 DESTDIR="$GG_ROOT" install
Copied!
In order for the installation to take effect, you must update paths (so executables and other files, such as man pages, are 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
Copied!
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).
You've installed Golf!
To test, type in command line:
gg -g
Copied!
If you see the path you choose for GG_ROOT above, it's working!
A few notes due to the fact that root access isn't used for this Golf installation:
- 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 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 {} \;
Copied!
If you're using TCP ports, then this setup isn't necessary.
Here's how to uninstall.
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
Copyright (c) 2019-2025 Gliim LLC. All contents on this web site is "AS IS" without warranties or guarantees of any kind.