mirror of
https://github.com/smittix/intercept.git
synced 2026-06-08 14:11:54 -07:00
Fix broken packages before RTL-SDR installation
Run apt --fix-broken install and dpkg --configure -a to resolve any lingering package conflicts before proceeding. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -699,14 +699,19 @@ install_debian_packages() {
|
||||
progress "Updating APT package lists"
|
||||
$SUDO apt-get update -y >/dev/null
|
||||
|
||||
# Fix any broken packages first
|
||||
info "Checking for broken packages..."
|
||||
$SUDO apt-get --fix-broken install -y 2>/dev/null || true
|
||||
$SUDO dpkg --configure -a 2>/dev/null || true
|
||||
|
||||
progress "Installing RTL-SDR"
|
||||
# Fix potential package conflicts between RTL-SDR Blog drivers and stock packages
|
||||
# These can conflict when switching between source-built and apt versions
|
||||
if dpkg -l 2>/dev/null | grep -qE "librtlsdr0|librtlsdr2"; then
|
||||
info "Cleaning up existing RTL-SDR packages to avoid conflicts..."
|
||||
$SUDO apt-get remove -y librtlsdr0 librtlsdr2 rtl-sdr librtlsdr-dev 2>/dev/null || true
|
||||
$SUDO apt-get autoremove -y 2>/dev/null || true
|
||||
fi
|
||||
info "Cleaning up existing RTL-SDR packages to avoid conflicts..."
|
||||
$SUDO apt-get remove -y --purge librtlsdr0 librtlsdr2 rtl-sdr librtlsdr-dev 2>/dev/null || true
|
||||
$SUDO apt-get autoremove -y 2>/dev/null || true
|
||||
$SUDO apt-get --fix-broken install -y 2>/dev/null || true
|
||||
|
||||
# Now install fresh
|
||||
if ! apt_install rtl-sdr; then
|
||||
warn "rtl-sdr package failed, RTL-SDR Blog drivers will provide the tools"
|
||||
|
||||
Reference in New Issue
Block a user