libmceliece: Full Installation Guide
libmceliece: Full Installation Guide for Global Users (System-Wide)
This guide walks you through installing libmceliece — a high-performance C implementation of the McEliece post-quantum cryptosystem — from source globally on a Linux system.
this script does not know how to check instruction-set extensions without python3-capstone, it's recommended to install python3-capstone for accurate CPU detection.
๐งฐ 1. Prerequisites
Install all necessary and recommended dependencies:
sudo apt update && sudo apt install -y \
autoconf \
build-essential \
clang \
python3 \
python3-pip \
gcc \
clang \
valgrind \
libcpucycles-dev \
librandombytes-dev \
python3-capstone \
wget \
curl \
make \
man-db
๐ Breakdown by Category
| Category | Packages |
|---|---|
| Build tools | gcc, clang, build-essential, make |
| Testing tools | valgrind |
| Crypto dependencies | libcpucycles-dev, librandombytes-dev |
| Python tools | python3, python3-pip, python3-capstone |
| Network & CLI | wget, curl, man-db |
⬇️ 2. Download the Latest libmceliece Release
Visit the official site or use wget to fetch the latest source:
# Download the latest version tag wget https://lib.mceliece.org/libmceliece-latest-version.txt # Extract the version number (e.g., 2025.04.28) version=$(cat libmceliece-latest-version.txt) # Download the corresponding tarball wget https://lib.mceliece.org/libmceliece-$version.tar.gz # Extract the archive tar -xzf libmceliece-$version.tar.gz cd libmceliece-$version
⚙️ 3. Configure, Build and Install (System-Wide)
./configure
make -j$(nproc)
sudo make install
This installs headers, libraries, binaries, and man pages to /usr/local.
Alternative for unprivileged users:
./configure --prefix=$HOME
make -j$(nproc)
make install
This installs the following:
Headers: /usr/local/include/
Libraries: /usr/local/lib/
Binaries: /usr/local/bin/
Man pages: /usr/local/man/
✅ 4. Post-Install: Test the Library
It’s critical to run the built-in test suite to validate the integrity and security of the build:
make check
๐ ️ Step 5: Configure the Dynamic Linker
Ensure the system recognizes the new library
sudo ldconfig
✅ Step 6: Verify Installation
Check the dynamic library is registered
sudo ldconfig
ldconfig -p | grep mceliece
Check if headers are available:
Check if binaries are installed:
๐ 7. Troubleshooting Common Issues
- Missing Capstone Warning:
this script does not know how to check instruction-set extensions without python3-capstone
→ Fix:sudo apt install python3-capstone - Missing Libraries: e.g.,
libcpucyclesorlibrandombytes
→ Fix: Ensurelibcpucycles-devandlibrandombytes-devare installed
๐ 8. Breakdown by Function
| Category | Packages |
|---|---|
| Build tools | gcc, clang, build-essential, make |
| Testing tools | valgrind |
| Post-quantum deps | libcpucycles-dev, librandombytes-dev |
| Python env | python3, python3-pip, python3-capstone |
| Network/CLI tools | wget, curl, man-db |
๐งช 9. Optional: Check if everything is correctly installed
gcc --version
clang --version
python3 --version
python3 -c "import capstone; print('Capstone OK')"
If all print versions or success messages, your prerequisites are ready.
๐ References
Version: Based on 2025.04.28 release of the installation documentation.