在 Debian 下“降级 compton”通常有两种理解:
compton,想换成更老/更稳定的版本picom(compton 的继任者),想降级到旧 compton 或旧 picom下面分别说明。
which compton
which picom
apt list --installed | grep -E 'compton|picom'
compton:Debian 旧包名就是 comptonpicom:新版 Debian 已用 picom 替代 comptonapt-cache policy compton
# 或
apt-cache policy picom
你会看到类似:
compton:
Installed: 1.0.0
Candidate: 1.0.0
Version table:
1.0.0 500
500 http://deb.debian.org/debian bookworm/main amd64 Packages
0.1~git2021 500
500 http://deb.debian.org/debian bullseye/main amd64 Packages
sudo apt install compton=0.1~git2021
# 或
sudo apt install picom=旧版本号
如果提示依赖问题,可加:
sudo apt install --allow-downgrades compton=版本号
如果当前仓库没有旧版:
# 编辑 sources.list
sudo nano /etc/apt/sources.list
添加(示例为 bullseye):
deb http://snapshot.debian.org/archive/debian/20211231T000000Z/ bullseye main
然后:
sudo apt update
sudo apt install compton=旧版本
用完建议注释掉该源。
适合你明确想要某个 git 提交:
sudo apt remove compton picom
sudo apt build-dep compton
git clone https://github.com/chjj/compton.git
cd compton
git checkout 旧commit或tag
make
sudo make install
Debian 新版本已移除 compton,只提供 picom。
解决方式:
picom(配置基本兼容)comptonsudo apt-mark hold compton
如果你能告诉我:
我可以给你精确的一条命令方案。