Installing pGenie on Linux¶
There are three ways to install pGenie on Linux: using Homebrew, downloading a pre-built binary, or building from source.
Option 1 — Homebrew¶
Homebrew is available on Linux and provides the simplest installation path, handling libpq as a dependency automatically.
Install pre-built binary (fastest)¶
Build from source via Homebrew¶
This builds from the latest master branch and can take several minutes during the first build.
Option 2 — Pre-built Binary¶
Pre-built binaries for Linux (x86-64) are available on the pGenie releases page. The binary is distributed as a .tar.gz archive.
-
Download the latest archive from the releases page:
-
Extract the binary:
-
Move the binary to a directory on your
PATH: -
Install the
libpqruntime library. pGenie links dynamically against PostgreSQL's C client library: -
Verify the installation:
Option 3 — From Source¶
Building from source gives you full control.
Prerequisites¶
Install the libpq development headers. The build links against PostgreSQL's C client library:
# Debian / Ubuntu
sudo apt install libpq-dev
# Fedora / RHEL
sudo dnf install libpq-devel
# Arch Linux
sudo pacman -S postgresql-libs
Stack¶
Stack manages the compiler and dependencies entirely on its own, making it the fastest path to building pGenie from source. No other toolchain installation is required.
-
Install Stack
Run the official one-line installer:
or
For platform-specific instructions and alternative install methods, see the official Stack installation guide.
-
Clone the repository:
-
Install the
pgnexecutable:Stack will download the required GHC version automatically if needed, compile pGenie, and install the
pgnbinary into~/.local/bin/. -
Ensure
~/.local/binis on yourPATH. Add the following to your shell profile (.bashrc,.zshrc, etc.): -
Verify the installation:
Cabal¶
Cabal is the standard Haskell build tool. It requires a GHC compiler to be installed separately, which you can obtain via GHCup.
-
Install the Haskell toolchain via GHCup:
Follow the prompts. GHCup will install GHC and Cabal.
-
Clone the repository:
-
Install the
pgnexecutable:Cabal will compile pGenie and install the
pgnbinary into~/.cabal/bin/. -
Ensure
~/.cabal/binis on yourPATH. Add the following to your shell profile (.bashrc,.zshrc, etc.): -
Verify the installation:
Docker Requirement¶
Docker must be running as a daemon before invoking pgn:
Your user should be in the docker group to avoid requiring sudo: