每次我尝试安装或清除应用程序时,Konsole 都会抛出未满足依赖项的错误。例如,如果我尝试sudo apt-get purge google-chrome-stable
它会抛出这些错误
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies.
app-outlet : Depends: flatpak but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
如果我尝试运行,sudo apt-get install flatpak
它会再次抛出一些错误
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies.
flatpak : Depends: libappstream-glib8 (>= 0.6.1) but it is not going to be installed
Depends: libostree-1-1 (>= 2019.6) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
我甚至尝试了终端的解决方案sudo apt --fix-broken install
,但它再次抛出了错误
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies.
app-outlet : Depends: flatpak but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
我试过了sudo apt update
,但出现了这些错误
E: The repository 'http://ppa.launchpad.net/george-edison55/nitroshare/ubuntu focal Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://ppa.launchpad.net/noobslab/apps/ubuntu focal Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch https://deb.etcher.io/dists/stable/InRelease 403 Forbidden [IP: 54.148.26.147 443]
E: The repository 'https://deb.etcher.io stable InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
我的系统/分布规格是:
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.1 LTS"
NAME="Ubuntu"
VERSION="20.04.1 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.1 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
我跑了 grep -ir "^deb" /etc/apt/ --include=*.list
/etc/apt/sources.list.d/maarten-fonville-ubuntu-android-studio-focal.list:deb http://ppa.launchpad.net/maarten-fonville/android-studio/ubuntu focal main
/etc/apt/sources.list.d/balena-etcher.list:deb https://deb.etcher.io stable etcher
/etc/apt/sources.list.d/protonvpn-stable.list:deb [signed-by=/usr/share/keyrings/protonvpn-stable-archive-keyring.gpg] https://repo.protonvpn.com/debian stable main
/etc/apt/sources.list.d/kdenlive-ubuntu-kdenlive-stable-focal.list:deb http://ppa.launchpad.net/kdenlive/kdenlive-stable/ubuntu focal main
/etc/apt/sources.list.d/freedownloadmanager.list:deb [arch=amd64] https://debrepo.freedownloadmanager.org/ bionic main
/etc/apt/sources.list.d/dawidd0811-ubuntu-neofetch-focal.list:deb http://ppa.launchpad.net/dawidd0811/neofetch/ubuntu focal main
/etc/apt/sources.list.d/slack.list:deb https://packagecloud.io/slacktechnologies/slack/debian/ jessie main
/etc/apt/sources.list.d/google-chrome.list:deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
/etc/apt/sources.list.d/micahflee-ubuntu-ppa-focal.list:deb http://ppa.launchpad.net/micahflee/ppa/ubuntu focal main
/etc/apt/sources.list.d/persepolis-ubuntu-ppa-focal.list:deb http://ppa.launchpad.net/persepolis/ppa/ubuntu focal main
/etc/apt/sources.list.d/agornostal-ubuntu-ulauncher-focal.list:deb http://ppa.launchpad.net/agornostal/ulauncher/ubuntu focal main
/etc/apt/sources.list.d/linuxuprising-ubuntu-shutter-focal.list:deb http://ppa.launchpad.net/linuxuprising/shutter/ubuntu focal main
/etc/apt/sources.list.d/teamviewer.list:deb https://linux.teamviewer.com/deb stable main
/etc/apt/sources.list.d/system76-dev-ubuntu-stable-focal.list:deb http://ppa.launchpad.net/system76-dev/stable/ubuntu focal main
/etc/apt/sources.list.d/system76-dev-ubuntu-stable-focal.list:deb-src http://ppa.launchpad.net/system76-dev/stable/ubuntu focal main
/etc/apt/sources.list:deb http://pk.archive.ubuntu.com/ubuntu/ focal main restricted
/etc/apt/sources.list:deb http://pk.archive.ubuntu.com/ubuntu/ focal-updates main restricted
/etc/apt/sources.list:deb http://pk.archive.ubuntu.com/ubuntu/ focal universe
/etc/apt/sources.list:deb http://pk.archive.ubuntu.com/ubuntu/ focal-updates universe
/etc/apt/sources.list:deb http://pk.archive.ubuntu.com/ubuntu/ focal multiverse
/etc/apt/sources.list:deb http://pk.archive.ubuntu.com/ubuntu/ focal-updates multiverse
/etc/apt/sources.list:deb http://pk.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu focal-security main restricted
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu focal-security universe
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu focal-security multiverse
/etc/apt/sources.list:deb https://dl.winehq.org/wine-builds/ubuntu/ groovy main
答案1
因此您有许多损坏的存储库。
要从系统中删除它们,请使用以下命令:
sudo add-apt-repository -r ppa:george-edison55/nitroshare
sudo add-apt-repository -r ppa:noobslab/apps
sudo add-apt-repository -r "deb https://deb.etcher.io stable etcher"
sudo rm /etc/apt/sources.list.d/balena-etcher.list
然后切换到主 ubuntu 镜像
sudo sed -i "s/pk.//g" /etc/apt/sources.list
然后通过以下方式更新包列表
sudo apt-get update
然后安装所有升级
sudo apt-get dist-upgrade
安装所有新的依赖项。