求助解决Ubuntu 16.04更新失败问题,以安装FileZilla
Hey there, sorry to hear you're stuck with update errors blocking FileZilla installation on Ubuntu 16.04. Let's walk through some targeted fixes that often resolve these kinds of issues—even if you've tried some before, maybe we missed a step or two!
第一步:清理dpkg进程锁
Interrupted updates often leave behind lock files that block any new package operations. Let's take care of that first:
- Check for processes holding the dpkg lock:
sudo lsof /var/lib/dpkg/lock-frontend - If you see a process listed, kill it (replace
PIDwith the process ID from the output):sudo kill -9 PID - Remove the lock files:
sudo rm /var/lib/dpkg/lock-frontend sudo rm /var/lib/apt/lists/lock sudo rm /var/cache/apt/archives/lock - Reconfigure dpkg to fix any broken states:
sudo dpkg --configure -a
第二步:修复损坏的依赖和软件包
Corrupted dependencies are one of the most common causes of update failures. Run these commands to fix them:
- Update your package cache while fixing missing entries:
sudo apt update --fix-missing - Force-install any broken dependencies:
sudo apt-get -f install - Clean up old package caches and unused packages:
sudo apt clean && sudo apt autoremove
第三步:修复软件源配置(关键!)
Ubuntu 16.04 (Xenial Xerus) reached end-of-life, so the default official sources are no longer active. This often causes update errors. Let's switch to the old-releases archive:
- Back up your current sources list first:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak - Edit the sources file with nano:
sudo nano /etc/apt/sources.list - Replace all existing content with these lines (these point to Ubuntu's official old releases archive):
deb http://old-releases.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse - Save and exit: Press
Ctrl+O, hit Enter, thenCtrl+X - Update your package cache again:
sudo apt update
第四步:尝试安装FileZilla
Once you've worked through the above steps, try installing FileZilla again:
- Install via apt:
sudo apt install filezilla - If that still fails, download the compatible .deb package for Ubuntu 16.04 (from the old releases archive) and install it directly:
# Replace the filename with the correct one for your system architecture sudo dpkg -i filezilla_3.15.0.2-1ubuntu1_amd64.deb # Fix any remaining dependencies if needed sudo apt -f install
If you're still getting errors, share the exact error message you see—this will help pinpoint the exact issue!
内容的提问来源于stack exchange,提问作者vinoth mathew

