Installing LDF on Linux (Fedora/RHEL/CentOS)
December 26, 2025 · View on GitHub
For: Complete beginners and experienced users Time: 30-45 minutes What you'll install: Python 3.10+, pip, VS Code, Git, LDF Distributions: Fedora 36+, RHEL 9+, CentOS Stream 9+, Rocky Linux 9+, AlmaLinux 9+
What You'll Need
Before starting:
- Fedora 36 or later, OR RHEL/CentOS/Rocky/AlmaLinux 9 or later
- sudo access (administrator privileges)
- Internet connection
- About 2 GB of free disk space
Step 1: Install Python 3.10 or Later
Check if Python is Already Installed
Open Terminal (Ctrl+Alt+T or from Activities menu), then type:
python3 --version
If you see Python 3.10.0 or higher (like 3.11.5, 3.12.1):
- ✅ Python is already installed! Skip to "Install pip" below.
If you see Python 3.9.x or lower, OR "command not found":
- Continue below to install Python.
Install Python 3.10+
Fedora 38+ / RHEL 9+ (Python 3.11+ included):
sudo dnf install python3 python3-pip python3-devel -y
Fedora 36-37 (Python 3.10+ included):
sudo dnf install python3 python3-pip python3-devel -y
RHEL 8 / CentOS 8 (Need Python 3.11 module):
# Enable Python 3.11 module
sudo dnf module enable python311 -y
sudo dnf install python3.11 python3.11-pip python3.11-devel -y
# Set as default python3
sudo alternatives --set python3 /usr/bin/python3.11
Verify Installation
python3 --version
Expected output:
Python 3.11.5
Install pip (if not already installed)
sudo dnf install python3-pip -y
Verify pip:
pip3 --version
Expected output:
pip 23.0.1 from /usr/lib/python3.11/site-packages/pip (python 3.11)
Step 2: Install Visual Studio Code (Optional but Recommended)
What is VS Code? A free code editor from Microsoft. Not required, but makes editing LDF specs much easier.
Option A: Install via RPM Repository (Recommended)
-
Add Microsoft repository:
# Import Microsoft GPG key sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc # Add VS Code repository sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo' -
Install VS Code:
# Update cache and install sudo dnf check-update sudo dnf install code -y -
Verify:
code --versionExpected output:
1.85.0 5c3e652f63e798a5ac2f31ffd0d863669328dc4c x64
Option B: Install via Flatpak (Alternative)
flatpak install flathub com.visualstudio.code -y
Note: Flatpak version runs in a sandbox and may have different file access permissions.
Step 3: Install Git
What is Git? Version control software. Required if you want to clone LDF examples or track changes to your code.
Check if Git is Already Installed
git --version
If you see git version 2.x.x:
- ✅ Git is already installed! Skip to Step 4.
If you see "command not found":
- Continue below.
Install Git
sudo dnf install git -y
Verify:
git --version
Expected output:
git version 2.39.1
Step 4: Install LDF
Now that Python and pip are installed, installing LDF is simple.
Basic Installation
pip3 install --user ldf
What's happening?
pip3is Python's package manager--userinstalls for your user only (no sudo needed)install ldfdownloads and installs the LDF CLI tool- This takes about 30 seconds
Expected output:
Collecting ldf
Downloading ldf-1.0.0-py3-none-any.whl (150 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 150.0/150.0 kB 2.5 MB/s eta 0:00:00
Collecting click>=8.0.0
Using cached click-8.1.7-py3-none-any.whl (97 kB)
[... more packages ...]
Installing collected packages: click, pyyaml, rich, jinja2, questionary, ldf
Successfully installed click-8.1.7 jinja2-3.1.2 ldf-1.0.0 pyyaml-6.0.1 questionary-2.0.1 rich-13.7.0
Add LDF to PATH
After installing with --user, add ~/.local/bin to your PATH:
# Add to PATH
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
Verify LDF Installation
ldf --version
Expected output:
ldf version 1.0.0
✅ Success! LDF is installed and ready to use.
Optional: Install LDF Extras
Install MCP Servers (for AI assistant integration):
pip3 install --user ldf[mcp]
Install Automation Features (for ChatGPT/Gemini API audits):
pip3 install --user ldf[automation]
Install S3 Support (for AWS S3 coverage uploads):
pip3 install --user ldf[s3]
Install All Extras:
pip3 install --user ldf[mcp,automation,s3]
Step 5: Verify Everything Works
ldf doctor
Expected output:
LDF Installation Health Check
=============================
Python version: 3.11.5 ✓
pip version: 23.0.1 ✓
LDF version: 1.0.0 ✓
Optional components:
MCP servers: Not installed
Automation: Not installed
S3 support: Not installed
All core components are working correctly!
Troubleshooting
Issue: "pip3: command not found"
Cause: pip wasn't installed.
Solution:
sudo dnf install python3-pip -y
Issue: "ldf: command not found" after installation
Cause: ~/.local/bin not in PATH.
Solution:
-
Add to PATH:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc source ~/.bashrc -
Verify:
ldf --version
Issue: Permission denied when running pip3 install
Cause: Trying to install system-wide without sudo or --user flag.
Solution 1 - Install for current user only (recommended):
pip3 install --user ldf
Solution 2 - Install system-wide (not recommended):
sudo pip3 install ldf
Note: Using --user is safer and doesn't require sudo.
Issue: Python version too old
Cause: Using RHEL 8 or older Fedora with Python 3.9 or earlier.
Solution for RHEL 8:
# Enable Python 3.11 module
sudo dnf module list python3*
sudo dnf module enable python311 -y
sudo dnf install python3.11 python3.11-pip -y
# Set as default
sudo alternatives --set python3 /usr/bin/python3.11
Solution for older Fedora: Upgrade to Fedora 36+ which includes Python 3.10+.
Issue: SELinux blocks VS Code or Git operations
Error message:
Permission denied (SELinux)
Solution:
-
Check SELinux status:
getenforce -
If Enforcing and causing issues, temporarily set to Permissive:
sudo setenforce 0 -
For permanent fix, create proper SELinux policies or:
sudo setsebool -P allow_execmem 1
Note: Disabling SELinux is not recommended for production systems.
Issue: Firewall blocks package downloads
Cause: Firewall blocking HTTP/HTTPS connections.
Solution:
-
Check firewall status:
sudo firewall-cmd --state -
If active, ensure HTTP/HTTPS allowed:
sudo firewall-cmd --permanent --add-service=http sudo firewall-cmd --permanent --add-service=https sudo firewall-cmd --reload
Next Steps
Now that LDF is installed:
- Complete Beginners: Continue to Your First LDF Spec
- Experienced Users: Jump to 5-Minute Quickstart
- Need Help?: See Troubleshooting Guide
Summary of What You Installed
| Tool | Purpose | Required? |
|---|---|---|
| Python 3.10+ | Run LDF and Python-based tools | ✅ Required |
| pip | Install Python packages | ✅ Required |
| VS Code | Edit LDF spec files | ⭐ Recommended |
| Git | Version control, clone examples | ⭐ Recommended |
| LDF | The LDF framework itself | ✅ Required |
Total disk space used: ~1.5 GB
Platform-Specific Notes
Fedora Workstation 40
- Python 3.12 included by default
- GNOME desktop with Wayland
- All commands above work without modifications
Fedora 39
- Python 3.12 included
- SELinux Enforcing by default
Fedora 38
- Python 3.11 included
- Use
dnffor all package operations
RHEL 9 / CentOS Stream 9 / Rocky Linux 9 / AlmaLinux 9
- Python 3.9 by default, use module system for 3.11+
- SELinux Enforcing by default
- May need Red Hat subscription for some packages (RHEL only)
RHEL 8 / CentOS 8 / Rocky Linux 8 / AlmaLinux 8
- Python 3.6 by default
- Must enable python311 module
- Use
dnf module enable python311
Package Manager Notes
- dnf is the modern package manager (Fedora 22+, RHEL 8+)
- yum is legacy but still works (RHEL 7, CentOS 7)
- Commands are mostly interchangeable:
dnf↔yum