Skip to main content

Installation

Note: The commands below download from the master branch. If the repository has been updated to use main or another default branch, adjust the URL accordingly.
wget -O ldb.zip https://github.com/scanoss/ldb/archive/master.zip
unzip ldb.zip
cd ldb-master
make
make lib
sudo make install

Directory Setup

In production environments, the Knowledge Base (KB) is typically stored on a dedicated disk or logical volume. Create your KB directory as follows:
sudo mkdir -p /data/ldb/oss  # 'oss' is the KB name
sudo chown -R user:user /data/ldb  # Replace 'user' with your system username
sudo chmod -R 755 /data/ldb
Note: Replace user with the username that will run the SCANOSS Engine.
Create a symbolic link from the default LDB path (/var/lib/ldb) to your KB directory:
sudo ln -s /data/ldb /var/lib/ldb
The subdirectories (purl, url, file, wfp) are created automatically during the KB import process — you do not need to create them manually.

Verify Installation

Run the following command to confirm LDB is installed correctly:
ldb
You should see the following output:
Welcome to LDB 2.02
Use help for a command list and quit for leaving this session
To exit the LDB session, run:
ldb> quit