For the latest Gerbil, you can clone the repository:
$ git clone https://github.com/vyzo/gerbil.git
The latest Gerbil release (v0.16) requires the latest Gambit release, v4.9.3. Older versions of Gambit, starting with v4.9.1 may also work, but we haven't tested.
The core system has no dependencies outside Gambit, but the standard
library has several mostly optional dependencies. The only hard dependency
libcrypto from OpenSSL; important parts of the standard library
All the other dependencies are soft.
Most library modules with foreign dependencies are not built by default,
with the exception of
sqlite. These are ubiquitous, stable
and generally useful enough to warrant being present by default;
you can still disable them if you want for a minimal installation.
In Ubuntu 20.04, you can install the dependencies for a default installation with:
$ sudo apt install libssl-dev zlib1g-dev libsqlite3-dev
The optional libraries can be enabled or disabled by passing arguments
to the configure script (see below). You can also enable features
later, by reconfiguring and running
./build.sh stdlib in
After unpacking a release or checking out the source code from Github, let
$GERBIL_HOME be the top directory of Gerbil.
Gerbil takes quite a while to compile, if you wish it to build faster, you can:
If you are using the default configuration, you can build Gerbil simply with:
On the other hand, if you need to override some configuration defaults, you will have to use the following (with your own set of configuration options):
$ cd $GERBIL_HOME/src $ ./configure --prefix=/path/to/which/to/install/gerbil --with-gambit=/path/to/installed/gambit \ --enable-feature1 --enable-feature2 --disable-feature3 --disable-feature4 --enable-feature5 $ ./build.sh $ ./install
./install can be skipped
to make a build with the default features enabled and
where runtime dependencies are found using the path and environment variables.
./install step is necessary if and only if you specify a
will allow Gerbil to find its installation directory
GERBIL_HOME is not set and
gxc are symlinks.
--with-gambit=/gambit/home will allow Gerbil to find Gambit even
GERBIL_GSC is unset; this is especially useful if GhostScript is in the
path, since both Gambit and GhostScript have a program named
Various features can be enabled or disabled by passing
./configure --help to see which
features are available. It will show the flags that modify the default; thus
it will offer
leveldb is not enabled by default;
and it will offer
zlib is enabled by default.
If you are building on macOS and want to use the homebrew OpenSSL,
then you need to specify appropriate
$ LDFLAGS=-L/usr/local/opt/openssl/lib \ CPPFLAGS=-I/usr/local/opt/openssl/include \ ./build.sh
Installation on macOS
Both Gambit and Gerbil are available via homebrew.
$ brew install gerbil-scheme
Skip the Install, Get Started on Docker
The latest Gerbil images are available via Docker Hub
Ubuntu based version:
docker pull gerbil/scheme
To get to the REPL:
docker run -it gerbil/scheme
To get a bash shell where you can compile programs:
docker run -it gerbil/scheme bash
Or you can build your own container using the Dockerfile
Using Nix and/or Docker
You can install Gerbil using Nix. See nix.md for more details.
There are also Docker containers based on Nix, with some gerbil libraries also installed,
root only) and
user working in
scripts directory of Gerbil Clan for details.