mirror of
https://github.com/smittix/intercept.git
synced 2026-06-09 22:43:32 -07:00
Improve RTL-SDR package conflict handling
Fix broken package states by: - Running apt --fix-broken install before attempting installation - Removing both librtlsdr2 and rtl-sdr when conflict detected - Cleaning up with autoremove - Running dpkg --configure -a to fix partial installations Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -555,10 +555,22 @@ install_debian_packages() {
|
||||
|
||||
progress "Installing RTL-SDR"
|
||||
# Handle package conflict between librtlsdr0 and librtlsdr2
|
||||
# First fix any broken package state
|
||||
if ! dpkg -l | grep -q "^ii.*rtl-sdr"; then
|
||||
info "Attempting to fix broken package state..."
|
||||
$SUDO apt-get --fix-broken install -y >/dev/null 2>&1 || true
|
||||
fi
|
||||
|
||||
# Remove conflicting packages
|
||||
if dpkg -l | grep -q librtlsdr2; then
|
||||
info "Removing conflicting librtlsdr2 package..."
|
||||
$SUDO apt-get remove -y librtlsdr2 >/dev/null 2>&1 || true
|
||||
$SUDO apt-get remove -y librtlsdr2 rtl-sdr >/dev/null 2>&1 || true
|
||||
$SUDO apt-get autoremove -y >/dev/null 2>&1 || true
|
||||
fi
|
||||
|
||||
# Clean up any partial installations
|
||||
$SUDO dpkg --configure -a >/dev/null 2>&1 || true
|
||||
|
||||
apt_install rtl-sdr
|
||||
|
||||
progress "Installing RTL-SDR Blog drivers (V4 support)"
|
||||
|
||||
Reference in New Issue
Block a user