Ubuntu中更新Compton版本的常用方法
這是Ubuntu系統中最便捷的更新方式,適用于大多數用戶。操作步驟如下:
Ctrl+Alt+T
),運行sudo apt update
,同步官方倉庫的最新軟件包信息。sudo apt upgrade compton
,系統會自動下載并安裝Compton的最新可用版本(需倉庫中存在)。killall compton && compton &
命令重啟Compton,使新版本生效。sudo add-apt-repository ppa:compton-compositor/stable
sudo apt update
sudo apt upgrade compton
若APT倉庫中的版本過舊,可直接下載Compton的最新.deb發布包手動安裝:
compton_0.1~beta2-1_amd64.deb
)。sudo dpkg -i /path/to/downloaded/compton_version.deb
(替換為實際下載路徑)。sudo apt-get install -f
自動修復依賴關系。killall compton && compton &
命令重啟服務。若需要Compton的最新開發版(可能包含未發布的特性),可通過源碼編譯安裝:
sudo apt install cmake libx11-dev libwayland-dev libxrandr-dev mesa-common-dev
,安裝編譯所需的工具和庫。git clone https://github.com/compton-compositor/compton.git
,進入項目目錄。mkdir build && cd build
cmake ..
make
sudo make install
無論采用哪種方法,更新完成后均需驗證版本:
compton --version
終端將輸出當前Compton的版本號,確認是否為預期版本。
~/.config/compton.conf
),避免新版本不兼容導致配置丟失。sudo apt --fix-broken install
修復,或手動安裝缺失的依賴包。