Skip to content

Installing Packages

Sam Ellicott edited this page Oct 8, 2025 · 4 revisions

Ubuntu

Ubuntu comes with libdivsufsort and bzlib natively in its repo. To install, run:

sudo apt-get install libdivsufsort-dev libbz2-dev

To install GMP MPFR use the following:

sudo apt-get install libmpfr6 libmpfr-dev

Red Hat based Linux distributions

Packaged dependencies can be installed with

sudo yum install jsoncpp-devel openssl-devel mpfr-devel gmp-devel bzip2-devel 

For other Linux distributions than Ubuntu, libdivsufsort needs to be installed separately.

Set LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib to link to shared libraries located in /usr/local/bin. Note that this is only valid for this shell session.

Edit /etc/ld.so.conf to add on a newline: /usr/local/lib to make it permanent. It will then look something like:

include ld.so.conf.d/*.conf
/usr/local/lib

Then run:

ldconfig
git clone --depth=1 https://github.com/y-256/libdivsufsort
mkdir libdivsufsort/build
cd libdivsufsort/build
cmake -DCMAKE_BUILD_TYPE="Release" -DCMAKE_INSTALL_PREFIX="/usr/local" ..
make && sudo make install

To enable 64-bit libdivsufsort for large (>256MB) files, you may need to build libdivsufsort with BUILD_DIVSUFSORT64=YES.

Clone this wiki locally