我尝试了 Gnome 命令中心并安装命令,但出现了如图所示的错误。
~$ sudo apt-get install --reinstall gnome-control-center
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libsane : Depends: libsnmp35 (>= 5.8+dfsg) but it is not going to be installed
Recommends: sane-utils (>= 1.0.29-0ubuntu5)
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
在搜索功能中也找不到设置
系统托盘菜单中也不可用设置
[
后斯科特告诉我可能解决此问题的步骤我在终端上尝试过,这是历史记录或日志。
incredibletwins@incredibletwins:~$ sudo apt --fix-broken install
[sudo] password for incredibletwins:
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
incredibletwins@incredibletwins:~$ sudo apt-get update
Hit:1 http://archive.canonical.com/ubuntu focal InRelease
Hit:9 http://ppa.launchpad.net/nm-l2tp/network-manager-l2tp/ubuntu focal
InRelease
Get:10 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Hit:11 http://ppa.launchpad.net/nm-l2tp/network-manager-l2tp/ubuntu bionic
InRelease
Fetched 401 kB in 8s (48.4 kB/s)
Reading package lists... Done
incredibletwins@incredibletwins:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
incredibletwins@incredibletwins:~$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
incredibletwins@incredibletwins:~$ sudo apt-get install libsnmp35
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libsnmp35 : Depends: libsensors5 (>= 1:3.5.0) but it is not going to be
installed
E: Unable to correct problems, you have held broken packages.
incredibletwins@incredibletwins:~$ sudo apt-get install sane-utils
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
sane-utils : Depends: libsane (>= 1.0.27)
E: Unable to correct problems, you have held broken packages.
incredibletwins@incredibletwins:~$ sudo apt-get reinstall gnome-control-
center gnome-settings-daemon
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libsane : Depends: libsnmp35 (>= 5.8+dfsg) but it is not going to be
installed
Recommends: sane-utils (>= 1.0.29-0ubuntu5)
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by
held packages.
incredibletwins@incredibletwins:~$ dpkg -l | grep libsnmp35
incredibletwins@incredibletwins:~$
我还可以尝试什么?
答案1
您肯定已经安装了外部包。
尝试运行此命令来查看冲突的依赖关系:
sudo apt-get -o Debug::pkgProblemResolver=yes install gnome-control-center
就我而言,我已经为 nvidia gpu 安装了 oibaf/graphics-drivers。
去掉它:
sudo add-apt-repository –remove ppa:oibaf/graphics-drivers
sudo apt-get autoclean
查看“oibaf”已安装的软件包。
sudo dpkg --list |grep oibaf |awk '{print $2}' | cut -f1 -d:
就我而言,我必须重新安装“focal”版本的软件包
sudo apt install debhelper/focal libclang1-10/focal libdebhelper-perl/focal libdrm-amdgpu1/focal libdrm-amdgpu1/focal libdrm-common/focal libdrm-intel1/focal libdrm-intel1/focal libdrm-nouveau2/focal libdrm-nouveau2/focal libdrm-radeon1/focal libdrm-radeon1/focal libdrm2/focal libdrm2/focal libegl-mesa0/focal libegl1-mesa/focal libgbm1/focal libgl1-mesa-dri/focal libgl1-mesa-dri/focal libgl1-mesa-glx/focal libgl1-mesa-glx/focal libglapi-mesa/focal libglapi-mesa/focal libglx-mesa0/focal libglx-mesa0/focal libllvm10/focal libllvm10/focal libwayland-egl1-mesa/focal libxatracker2/focal mesa-va-drivers/focal mesa-vdpau-drivers/focal mesa-vulkan-drivers/focal
并删除所有包奥伊巴夫。
重新启动您的电脑并安装 gnome-control-center gnome-settings-daemon。
sudo apt install gnome-control-center gnome-settings-daemon
答案2
检查你的 sane-utils,检查你是否有 gnome-control-center、gnome-settings-daemon、gnome-settings-common。
dpkg -l | grep sane-utils
dpkg -l | grep gnome-control
dpkg -l | grep gnome-settings
然后首先安装最新的sane-utils
包,稍后重新安装gnome-control-center
,gnome-settings-daemon
然后gnome-settings-daemon-common
。
apt-get install sane-utils
apt-get reinstall gnome-control-center gnome-settings-daemon
答案3
发布此
sudo apt --fix-broken install
sudo apt-get update
sudo apt-get upgrade
sudo apt --fix-broken install
sudo apt-get install libsnmp35
sudo apt-get install sane-utils
sudo apt-get reinstall gnome-control-center gnome-settings-daemon
保持冷静,这肯定是可以解决的...正如其他答案所建议的那样,如果这无法解决,请我们帮助您更新您的问题并显示当前错误
通常,您的错误意味着您安装了一个需要旧版本软件包的应用程序,这会阻止安装该软件包的较新版本(libsnmp35),因此可能的解决方案是删除有问题的应用程序并安装保留的软件包
运行完下面的命令后,如果显示该软件包安装了较早的版本,那么我们可能需要删除该软件包,这将卸载所有使用该软件包的应用程序,从而释放系统空间,以允许上述命令成功运行
更新您的问题并显示运行的输出
dpkg -l | grep libsnmp
答案4
我也遇到了同样的问题,解决办法是使用 Aptitude。请参阅此邮政。
$ sudo aptitude install gnome-control-center
Aptitude 不会轻易放弃,而是在处理依赖关系时提供了更多选项。它可以解决依赖冲突。