除了 gnome 设置应用程序之外,几乎所有东西似乎都运行良好。例如,选择桌面右上方菜单下的“显示设置”不会像以前一样打开设置窗口。我很快意识到它gnome-control-center
没有安装,于是我运行sudo apt install gnome-control-center
安装它。我得到了
Reading package lists... Done
Building dependency tree... Done
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:
libpython3.9 : Depends: libpython3.9-stdlib (= 3.9.5-3~21.04) but 3.9.7-1+focal1 is to be installed
E: Unable to correct problems, you have held broken packages.
长话短说,我有 4 个来自 focal 的 python3.9 包:
$ apt list --installed | grep python |grep -v "hirsute"
libpython3.9-minimal/now 3.9.7-1+focal1 amd64 [installed,local]
libpython3.9-stdlib/now 3.9.7-1+focal1 amd64 [installed,local]
python3.9-minimal/now 3.9.7-1+focal1 amd64 [installed,local]
python3.9/now 3.9.7-1+focal1 amd64 [installed,local]
不用说,其余的都在那里,而且它们都长满了毛。
我是否应该下载这些软件包的复杂版本并进行安装,dpkg -i --force-all
或者还有其他可能更简单的方法?
答案1
我能够通过下载正确的软件包并安装它们来解决该问题dpkg
:
wget http://security.ubuntu.com/ubuntu/pool/main/p/python3.9/libpython3.9-stdlib_3.9.5-3~21.04_amd64.deb
wget http://nl.archive.ubuntu.com/ubuntu/pool/main/m/mpdecimal/libmpdec3_2.5.1-2_amd64.deb
wget http://security.ubuntu.com/ubuntu/pool/main/p/python3.9/python3.9-minimal_3.9.5-3~21.04_amd64.deb
wget http://security.ubuntu.com/ubuntu/pool/main/p/python3.9/python3.9_3.9.5-3~21.04_amd64.deb
dpkg -i libmpdec3_2.5.1-2_amd64.deb
dpkg -i libpython3.9-stdlib_3.9.5-3~21.04_amd64.deb
dpkg -i python3.9-minimal_3.9.5-3~21.04_amd64.deb
dpkg -i python3.9_3.9.5-3~21.04_amd64.deb
libmpdec3
当我尝试安装时显示为缺少依赖项,libpython3.9-stdlib
所以我也安装了它。人越多越开心 :)