Debian12 重新安装GNOME Control Center

Debian12 bookworm在折腾一段时间之后设置按钮消失了。目前在右上角网络设置点击没跳转设置界面,应用列表也没有设置按钮,但是命令行其他功能没问题。

确认gnome控制中心的状态:

which gnome-control-center
dpkg -l | grep gnome-control-center

可以看到gnome-control-center不在了。只有一个gnome-control-center-data存在,因此需要安装gnome-control-center包。

修复源

sudo apt update

出现报错信息:

Warning: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://repo.steampowered.com/steam stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F24AEA9FB05498B7
Error: The repository 'https://download.docker.com/linux/debian trixie Release' does not have a Release file.
Notice: Updating from such a repository can't be done securely, and is therefore disabled by default.
Notice: See apt-secure(8) manpage for repository creation and user configuration details.
Error: The repository 'http://archive.debian.org/debian-archive stretch-archive Release' does not have a Release file.
Notice: Updating from such a repository can't be done securely, and is therefore disabled by default.
Notice: See apt-secure(8) manpage for repository creation and user configuration details.

可以看到有几个错误:

  • archive.debian.org源报错
  • docker源版本错误
  • 找不到steam的GPG的key错误

修复方法如下:

修复源版本

注释掉/etc/apt/sources.list中stretch的的这一行

# deb http://archive.debian.org/debian-archive stretch-archive main non-free-firmware

stretch-archive,是老的版本,在debian12中应该被弃用。可能是升级或其他事情导致的残留。

添加gpg

sudo curl -fsSL https://repo.steampowered.com/steam/archive/stable/steam.gpg | sudo gpg --dearmor -o /usr/share/keyrings/steam.gpg

该gpg在/etc/apt/source.list.d/steam-stable.list和/etc/apt/source.list.d/steam-beta.list中被使用:

# Uncomment these lines to try the beta version of the Steam launcher
#deb [arch=amd64,i386 signed-by=/usr/share/keyrings/steam.gpg] https://repo.steampowered.com/steam/ beta steam
#deb-src [arch=amd64,i386 signed-by=/usr/share/keyrings/steam.gpg] https://repo.steampowered.com/steam/ beta steam
deb [arch=amd64,i386 signed-by=/usr/share/keyrings/steam.gpg] https://repo.steampowered.com/steam/ stable steam
deb-src [arch=amd64,i386 signed-by=/usr/share/keyrings/steam.gpg] https://repo.steampowered.com/steam/ stable steam

修改docker源版本

修改docker.list 中的版本问题,将/etc/apt/sources.list.d/docker.list中的trixie改成bookworm

deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian trixie stable

最后运行sudo apt update成功。

解决并安装gnome-control-center

sudo apt install gnome-control-center

报错信息如下:

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:
Unsatisfied dependencies:
libsmbclient : Depends: samba-libs (= 2:4.17.12+dfsg-0+deb12u1) but 2:4.21.1+dfsg-1~bpo12+1 is to be installed
Error: Unable to correct problems, you have held broken packages.

可以发现samba-libs冲突,检查相关包状态:

apt-cache policy libsmbclient samba-libs

可以看到如下报错:

libsmbclient:
  Installed: (none)
  Candidate: 2:4.17.12+dfsg-0+deb12u1
  Version table:
     2:4.21.1+dfsg-1~bpo12+1 100
        100 https://mirrors.tuna.tsinghua.edu.cn/debian bookworm-backports/main amd64 Packages
     2:4.17.12+dfsg-0+deb12u1 500
        500 https://mirrors.tuna.tsinghua.edu.cn/debian bookworm/main amd64 Packages
        500 https://security.debian.org/debian-security bookworm-security/main amd64 Packages
samba-libs:
  Installed: 2:4.20.5+dfsg-1~bpo12+1
  Candidate: 2:4.21.1+dfsg-1~bpo12+1
  Version table:
     2:4.21.1+dfsg-1~bpo12+1 100
        100 https://mirrors.tuna.tsinghua.edu.cn/debian bookworm-backports/main amd64 Packages
 *** 2:4.20.5+dfsg-1~bpo12+1 100
        100 /var/lib/dpkg/status
     2:4.17.12+dfsg-0+deb12u1 500
        500 https://mirrors.tuna.tsinghua.edu.cn/debian bookworm/main amd64 Packages
        500 https://security.debian.org/debian-security bookworm-security/main amd64 Packages

可以发现libsmbclient和samba-lib所安装的源和版本存在冲突,我们在修复了源的问题之后卸载重装这两个库。

sudo apt install libsmbclient samba-libs

遇到新的报错:

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:

Unsatisfied dependencies:
 libldb2 : Breaks: samba-libs (< 2:4.19.0~) but 2:4.17.12+dfsg-0+deb12u1 is to be installed
Error: Unable to correct problems, you have held broken packages.

选择卸载重装:

dpkg -l | grep libldb2
sudo apt remove libldb2
sudo apt install libldb2 libsmbclient samba-libs
sudo apt install gnome-control-center

没有报错,三个包的依赖都解决了,同时设置界面也回来了。

总结

在遇到显示问题是,通常是遇到了做其他操作之后的兼容性问题,这是先纠正源,然后按照报错提示信息,依次卸载和安装对应的包就可以解决。

文章标题:Debian12 重新安装GNOME Control Center
文章作者:Myron
转载链接:https://phyiscs.com/debian-gnome-control-center-reinstall.html
上一篇
下一篇