我无法在 Ubuntu 中打开“设置”,也无法右键单击桌面。可以理解,我缺少了gnome-control-center
,但事实证明我缺少了几个依赖项,而这些依赖项又缺少进一步的依赖项。
执行sudo apt-get update
后sudo apt-get upgrade
返回没有安装任何包。
$ gnome-control-center
Command 'gnome-control-center' not found, but can be installed with:
sudo apt install gnome-control-center
但是,apt install 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:
gnome-control-center : Depends: gnome-control-center-data (< 1:3.37) but 1:3.38.5-1ubuntu2 is to be installed
Recommends: gnome-online-accounts (>= 3.25.3) but it is not going to be installed
Recommends: network-manager-gnome (>= 0.9.8) but it is not going to be installed
Recommends: gnome-control-center-faces but it is not going to be installed
Recommends: rygel but it is not going to be installed or
rygel-tracker but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
$ apt policy gnome-control-center
gnome-control-center:
Installed: (none)
Candidate: 1:3.36.5-0ubuntu4
Version table:
1:3.36.5-0ubuntu4 500
500 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
1:3.36.1-1ubuntu5 500
500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
无法安装以下软件包:
$ sudo apt install gnome-control-center-data
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
gnome-control-center-data is already the newest version (1:3.38.5-1ubuntu2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
$ apt policy gnome-control-center-data
gnome-control-center-data:
Installed: 1:3.38.5-1ubuntu2
Candidate: 1:3.38.5-1ubuntu2
Version table:
*** 1:3.38.5-1ubuntu2 100
100 /var/lib/dpkg/status
1:3.36.5-0ubuntu4 500
500 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
500 http://archive.ubuntu.com/ubuntu focal-updates/main i386 Packages
1:3.36.1-1ubuntu5 500
500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
500 http://archive.ubuntu.com/ubuntu focal/main i386 Packages
其他人也遇到了类似的情况:
$ sudo apt install gnome-online-accounts
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:
gnome-online-accounts : Depends: libgoa-1.0-0b (= 3.36.1-0ubuntu1) but 3.38.1-1ubuntu1.1 is to be installed
Depends: libgoa-backend-1.0-1 (= 3.36.1-0ubuntu1) but 3.38.1-1ubuntu1.1 is to be installed
Depends: python3-macaroonbakery but it is not going to be installed
Recommends: gnome-control-center (>= 3.6.1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
$ apt policy gnome-online-accounts
gnome-online-accounts:
Installed: (none)
Candidate: 3.36.1-0ubuntu1
Version table:
3.36.1-0ubuntu1 500
500 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
3.36.0-1ubuntu1 500
500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
以下是更多系统信息:
$ uname -a
Linux <username> 5.14.0-1054-oem #61-Ubuntu SMP Fri Oct 14 13:05:50 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
我查阅了这些页面,但无济于事。事实上,其中一些autoremove
导致更多依赖关系中断。
- https://serverok.in/ubuntu-20-04-settings-wont-open
- 系统设置无法启动,Ubuntu 16.04
- gnome-control-center 安装错误
- gnome-control-center 外观标签损坏
- 无法在 Ubuntu 18.04 中打开 gnome-control-center
- 报告:我无法在 Ubuntu 20.04 LTS 中打开设置
gnome-control-center
可以成功安装得益于这个帖子,但它根本无法启动。光标进入加载状态,几分钟后返回到指针。
apt 策略 gnome-control-center 现在提供
apt policy gnome-control-center
gnome-control-center:
Installed: 1:3.36.5-0ubuntu4
Candidate: 1:3.36.5-0ubuntu4
Version table:
*** 1:3.36.5-0ubuntu4 500
500 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
100 /var/lib/dpkg/status
1:3.36.1-1ubuntu5 500
500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
尝试从终端启动时gnome-control-center
返回此错误
gnome-control-center: symbol lookup error: /usr/lib/x86_64-linux-gnu/samba/libsamdb-common.so.0: undefined symbol: ldb_msg_element_add_value, version LDB_2.2.3
但是,apt 缓存策略无法找到该包。不确定 samba 是否重要,所以我也添加了它,但结果是一样的。
apt-cache policy libsamdb-common.so.0
N: Unable to locate package libsamdb-common.so.0
N: Couldn't find any package by glob 'libsamdb-common.so.0'
N: Couldn't find any package by regex 'libsamdb-common.so.0'
apt-cache policy samba/libsamdb-common.so.0
N: Unable to locate package samba/libsamdb-common.so.0
N: Couldn't find any package by glob 'samba/libsamdb-common.so.0'
N: Couldn't find any package by regex 'samba/libsamdb-common.so.0'
我在另一个上看到邮政尝试运行 ldd 命令,它给了我这个。
ldd /usr/lib/x86_64-linux-gnu/samba/libsamdb-common.so.0
linux-vdso.so.1 (0x00007ffdfcfcb000)
libsamba-hostconfig.so.0 => /lib/x86_64-linux-gnu/libsamba-hostconfig.so.0 (0x00007f787c5ba000)
libreplace.so.0 => /usr/lib/x86_64-linux-gnu/samba/libreplace.so.0 (0x00007f787c5b5000)
libndr-samba.so.0 => /usr/lib/x86_64-linux-gnu/samba/libndr-samba.so.0 (0x00007f787c45e000)
libcli-ldap-common.so.0 => /usr/lib/x86_64-linux-gnu/samba/libcli-ldap-common.so.0 (0x00007f787c454000)
libsamba-sockets.so.0 => /usr/lib/x86_64-linux-gnu/samba/libsamba-sockets.so.0 (0x00007f787c439000)
libflag-mapping.so.0 => /usr/lib/x86_64-linux-gnu/samba/libflag-mapping.so.0 (0x00007f787c432000)
libsamba-errors.so.1 => /lib/x86_64-linux-gnu/libsamba-errors.so.1 (0x00007f787c2e7000)
libsamba-util.so.0 => /lib/x86_64-linux-gnu/libsamba-util.so.0 (0x00007f787c274000)
libsamba-security.so.0 => /usr/lib/x86_64-linux-gnu/samba/libsamba-security.so.0 (0x00007f787c252000)
libndr.so.1 => /lib/x86_64-linux-gnu/libndr.so.1 (0x00007f787c235000)
libsocket-blocking.so.0 => /usr/lib/x86_64-linux-gnu/samba/libsocket-blocking.so.0 (0x00007f787c230000)
libtevent-util.so.0 => /lib/x86_64-linux-gnu/libtevent-util.so.0 (0x00007f787c227000)
libsamba-debug.so.0 => /usr/lib/x86_64-linux-gnu/samba/libsamba-debug.so.0 (0x00007f787c21c000)
libsys-rw.so.0 => /usr/lib/x86_64-linux-gnu/samba/libsys-rw.so.0 (0x00007f787c217000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f787c1f5000)
libtalloc.so.2 => /lib/x86_64-linux-gnu/libtalloc.so.2 (0x00007f787c1e6000)
libldb.so.2 => /lib/x86_64-linux-gnu/libldb.so.2 (0x00007f787c1b2000)
libtevent.so.0 => /lib/x86_64-linux-gnu/libtevent.so.0 (0x00007f787c19b000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f787bfaf000)
libserver-role.so.0 => /usr/lib/x86_64-linux-gnu/samba/libserver-role.so.0 (0x00007f787bfaa000)
libgnutls.so.30 => /lib/x86_64-linux-gnu/libgnutls.so.30 (0x00007f787bdad000)
libtdb.so.1 => /lib/x86_64-linux-gnu/libtdb.so.1 (0x00007f787bd93000)
libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f787bd7b000)
libndr-nbt.so.0 => /lib/x86_64-linux-gnu/libndr-nbt.so.0 (0x00007f787bd4f000)
libasn1util.so.0 => /usr/lib/x86_64-linux-gnu/samba/libasn1util.so.0 (0x00007f787bd46000)
libndr-standard.so.0 => /lib/x86_64-linux-gnu/libndr-standard.so.0 (0x00007f787b9e3000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f787b9c7000)
libiov-buf.so.0 => /usr/lib/x86_64-linux-gnu/samba/libiov-buf.so.0 (0x00007f787b9c2000)
libinterfaces.so.0 => /usr/lib/x86_64-linux-gnu/samba/libinterfaces.so.0 (0x00007f787b9bb000)
libnsl.so.1 => /lib/x86_64-linux-gnu/libnsl.so.1 (0x00007f787b99f000)
libtime-basic.so.0 => /usr/lib/x86_64-linux-gnu/samba/libtime-basic.so.0 (0x00007f787b99a000)
libgenrand.so.0 => /usr/lib/x86_64-linux-gnu/samba/libgenrand.so.0 (0x00007f787b995000)
libicuuc.so.66 => /lib/x86_64-linux-gnu/libicuuc.so.66 (0x00007f787b7af000)
libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007f787b6f7000)
libicui18n.so.66 => /lib/x86_64-linux-gnu/libicui18n.so.66 (0x00007f787b3f8000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f787b3f1000)
/lib64/ld-linux-x86-64.so.2 (0x00007f787c62f000)
libp11-kit.so.0 => /lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007f787b2b8000)
libidn2.so.0 => /lib/x86_64-linux-gnu/libidn2.so.0 (0x00007f787b296000)
libunistring.so.2 => /lib/x86_64-linux-gnu/libunistring.so.2 (0x00007f787b112000)
libtasn1.so.6 => /lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007f787b0fc000)
libnettle.so.8 => /lib/x86_64-linux-gnu/libnettle.so.8 (0x00007f787b0b6000)
libhogweed.so.6 => /lib/x86_64-linux-gnu/libhogweed.so.6 (0x00007f787b06e000)
libgmp.so.10 => /lib/x86_64-linux-gnu/libgmp.so.10 (0x00007f787afeb000)
libmd.so.0 => /lib/x86_64-linux-gnu/libmd.so.0 (0x00007f787afde000)
libicudata.so.66 => /lib/x86_64-linux-gnu/libicudata.so.66 (0x00007f787951b000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f7879302000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f78791b4000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f7879199000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f787918e000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f7879161000)
libzstd.so.1 => /lib/x86_64-linux-gnu/libzstd.so.1 (0x00007f7879094000)
liblz4.so.1 => /lib/x86_64-linux-gnu/liblz4.so.1 (0x00007f7879074000)
libcap.so.2 => /lib/x86_64-linux-gnu/libcap.so.2 (0x00007f7879069000)
libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007f7878f46000)
libffi.so.8 => /lib/x86_64-linux-gnu/libffi.so.8 (0x00007f7878f3a000)
libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007f7878f10000)
sudo ubuntu-drivers autoinstall 给出此输出。据我所知,我的 NVIDIA 显卡应该使用 driver-470,因此其他的驱动程序也包括在内,这很奇怪。
sudo ubuntu-drivers autoinstall
WARNING:root:_pkg_get_support nvidia-driver-525-server: package has invalid Support PBheader, cannot determine support level
WARNING:root:_pkg_get_support nvidia-driver-515: package has invalid Support PBheader, cannot determine support level
WARNING:root:_pkg_get_support nvidia-driver-515-open: package has invalid Support PBheader, cannot determine support level
WARNING:root:_pkg_get_support nvidia-driver-510: package has invalid Support PBheader, cannot determine support level
WARNING:root:_pkg_get_support nvidia-driver-525-open: package has invalid Support PBheader, cannot determine support level
WARNING:root:_pkg_get_support nvidia-driver-525: package has invalid Support PBheader, cannot determine support level
WARNING:root:_pkg_get_support nvidia-driver-515-server: package has invalid Support PBheader, cannot determine support level
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
dctrl-tools dkms libnvidia-cfg1-525 libnvidia-common-525
libnvidia-compute-525 libnvidia-compute-525:i386 libnvidia-decode-525
libnvidia-encode-525 libnvidia-extra-525 libnvidia-fbc1-525 libnvidia-gl-525
libxnvctrl0 nvidia-compute-utils-525 nvidia-kernel-common-525
nvidia-kernel-source-525-open nvidia-prime nvidia-settings nvidia-utils-525
screen-resolution-extra xserver-xorg-video-nvidia-525
Suggested packages:
debtags menu nvidia-driver-525
Recommended packages:
libnvidia-decode-525:i386 libnvidia-encode-525:i386 libnvidia-fbc1-525:i386
libnvidia-gl-525:i386
The following packages will be REMOVED:
libnvidia-compute-470
The following NEW packages will be installed:
dctrl-tools dkms libnvidia-cfg1-525 libnvidia-common-525
libnvidia-compute-525 libnvidia-compute-525:i386 libnvidia-decode-525
libnvidia-encode-525 libnvidia-extra-525 libnvidia-fbc1-525 libnvidia-gl-525
libxnvctrl0 nvidia-compute-utils-525 nvidia-dkms-525-open
nvidia-driver-525-open nvidia-kernel-common-525
nvidia-kernel-source-525-open nvidia-prime nvidia-settings nvidia-utils-525
screen-resolution-extra xserver-xorg-video-nvidia-525
0 upgraded, 22 newly installed, 1 to remove and 5 not upgraded.
Need to get 338 MB/339 MB of archives.
After this operation, 884 MB of additional disk space will be used.
存在多个损坏的依赖项时,如何安装/启动gnome-control-center
?