Skip to content
Keith Maxwell edited this page Nov 16, 2023 · 64 revisions

Ubuntu

Ubuntu 18.04 LTS / 20.04 LTS

An Ansible Playbook for provisioning a Gollum instance on Ubuntu 18.04 or 20.04 is available at Gollum Easy Install.

Ubuntu 16.04 LTS

Install gollum system-wide:

sudo apt-get install ruby ruby-dev make zlib1g-dev libicu-dev build-essential git cmake libssl-dev
sudo gem install gollum

Gollum requires ruby 2.4 or higher. Installation instructions for ruby 2.4 on Ubuntu 16.04 can be found here.

That will cover the most basic installation on a local machine. If you are planning to install Gollum on a server, you can follow the third party Gollum installation guide.

ℹ️ On Ubuntu 14.04 LTS, the Ruby packages to install are ruby1.9.1 and ruby1.9.1-dev

ℹ️ You may also need apt-get install zlib1g zlib1g-dev libicu-dev(on WSL2/Ubuntu 18.04.4 LTS)

ℹ️ You might also need to manually install github-markdown (e.g. if markdown tables don't render properly. See this issue for more explanation):

sudo gem install github-markdown

Debian

Debian 9.7 - gem

Install gollum system-wide as root:

apt install ruby ruby-dev build-essential zlib1g-dev libicu-dev
gem install gollum

Debian 9.7 - package

Since version Debian 9, Gollum is packaged in Debian. To install gollum system-wide:

apt install ruby-gollum-lib

Debian 8.11 - gem

Since nokogiri requires Ruby version >= 2.3.0, we need to install the stable version of Ruby.

#Defaults to jessie for every other package
echo 'APT::Default-Release "jessie";' | tee -a /etc/apt/apt.conf.d/00local
#Point apt to a stretch repository
echo "deb http://ftp.us.debian.org/debian stretch main" >> /etc/apt/sources.list.d/stretch.list
apt update
#Install the version of stretch of the following packages
apt-get -t stretch install ruby ruby-dev build-essential zlib1g-dev libicu-dev
gem install gollum

ℹ️ Alternatively prefix each command with sudo if you've configured sudo on your debian machine.

CentOS 7

Install gollum system-wide up to v2.7.0

sudo yum group install "Development Tools"
sudo yum install ruby ruby-devel libicu libicu-devel zlib zlib-devel git
sudo yum install cmake3
sudo yum remove  cmake
sudo ln -s /usr/bin/cmake3 /usr/bin/cmake
sudo gem install gollum -v 2.7.0

From there ruby has to be upgraded beyond version from official repos (v2.0), look at RVM section

CentOS 8

Install gollum system-wide.

sudo yum group install "Development Tools"
sudo yum install ruby ruby-devel libicu libicu-devel zlib zlib-devel git cmake openssl-devel
sudo gem install gollum

Fedora 39

Install gollum system wide:

dnf groupinstall "Development Tools"
dnf install cmake gcc-g++ git libicu-devel libicu libyaml-devel openssl-devel ruby-devel ruby zlib-devel zlib
gem install gollum

Alpine

apk --update add alpine-sdk icu-dev 
gem install gollum 

Windows

First, install JRuby and then:

~$ gem install gollum

OS X

Install gollum system-wide.

Ensure you have X-Code command line utilities installed:

xcode-select --install

Using Homebrew package manager

The Homebrew installation path for Intel Macs is /usr/local/opt and for ARM based Macs it is /opt/homebrew/opt (from https://docs.brew.sh/Installation). The following is based on https://github.com/brianmario/charlock_holmes#homebrew.

brew install icu4c
gem install charlock_holmes -- --with-icu-dir=/path/to/installed/icu4c --with-cxxflags=-std=c++11
gem install gollum

To install with Native libraries see https://nokogiri.org/tutorials/installing_nokogiri.html#macos

brew install libxml2 libxslt
gem install nokogiri --platform=ruby -- --use-system-libraries

Using MacPorts package manager

First install Ruby. Replace <ruby-portname> for the Ruby you wish to install and use (e.g. ruby21 or jruby):

sudo port install ruby_select <ruby-portname>

Then set the installed Ruby as default so that commands like ruby --version can use it:

sudo port select --set ruby <ruby-portname>

Then install gem compilation dependency:

sudo port install icu

For CharlockHolmes, you might try this (assumes standard macports directory /opt/local)

sudo gem install charlock_holmes -- --with-icu-dir=/opt/local/lib/icu \
     --with-opt-include=/opt/local/include/ --with-opt-lib=/opt/local/lib/

And finally, install gollum:

sudo gem install gollum

Troubleshooting

If you get this error:

$ sudo gem install gollum
Fetching: posix-spawn-0.3.13.gem (100%)
Building native extensions.  This could take a while...
ERROR:  While executing gem ... (Errno::EPERM)
    Operation not permitted - /usr/bin/posix-spawn-benchmark

You could try this:

sudo gem install gollum --user-install

--user-install means that the gems (gollum and its dependencies) will be installed user your user home directory, for example: ~/.gem/ruby/2.0.0/.

So in order to run gollum from that directory, do this:

~/.gem/ruby/2.0.0/bin/gollum

If you get this error:

ERROR: CMake is required to build Rugged.

Install CMake:

brew install cmake

Using Ruby Version Manager (RVM)

Use RVM to install the current version of ruby and use this version as the default ruby command:

sudo rvm install current && rvm use current

Install gem compilation dependency:

sudo port install icu

Install gollum:

sudo gem install gollum

Docker

See Gollum-via-Docker.