如何避免 apt 强制我升级软件包

如何避免 apt 强制我升级软件包

我是 Linux 新手,我尝试过使用 Gnome 扩展和一个名为 libmutter 的软件包在 Linux 上进行自定义,该软件包在我的系统上有一个旧版本

每当我尝试下载任何软件包时,我都会收到此错误 -

  ~ sudo apt install peek      
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 gir1.2-mutter-10 : Depends: libmutter-10-0 (= 42.9-0ubuntu5) but 42.2-0ubuntu1 is to be installed
 gnome-shell : Depends: libmutter-10-0 (>= 42.9) but 42.2-0ubuntu1 is to be installed
 peek : Depends: ffmpeg
        Depends: libkeybinder-3.0-0 (>= 0.3.0) but it is not going to be installed
        Recommends: gstreamer1.0-plugins-ugly 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 时,它将 libmutter 升级到最新版本,然后该软件包停止工作,但我可以正常安装其他软件包,我必须从其 zip 文件中手动 dpkg 并注销以应用更改

有什么解决方法吗?

答案1

您需要启用universe存储库:

sudo add-apt-repository universe
sudo apt update
sudo apt install peek

您需要按如下方式编辑您的sources.list sudo apt edit-sources

deb http://cz.archive.ubuntu.com/ubuntu jammy main restricted universe multiverse
deb http://cz.archive.ubuntu.com/ubuntu jammy-security multiverse universe main restricted
deb http://security.ubuntu.com/ubuntu/ jammy-security multiverse universe main restricted
deb http://cz.archive.ubuntu.com/ubuntu jammy-updates main restricted universe multiverse

然后:

sudo apt update
sudo apt upgrade
sudo apt install peek

相关内容