table of contents
| GOLF(2gg) | Development | GOLF(2gg) |
NAME¶
install-in-any-folder-debian-ubuntu-raspbian - Golf documentation (install-golf)
DESCRIPTION¶
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"
Download 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 (you do need root access for this, or if not, ask your System Administrator to perform these tasks):
sudo apt update sudo apt -y install devscripts equivs build-essential yes|mk-build-deps -i -s sudo debian-upstream/control
Then compile the source:
make -j$(nproc) GG_LOCAL=1 DESTDIR="$GG_ROOT"
And install Golf:
make GG_LOCAL=1 DESTDIR="$GG_ROOT" install
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 -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).
You've installed Golf!
To test, type in command line:
gg -g
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:
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.
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
| $VERSION | $DATE |