Xiè*_*léi 8 debian package-management aptitude
以ibus-sunpinyin为例,在squeeze release中没有。我不打算将整个系统切换到 sid 分支,因此,我想从 sid 存储库下载单个包并像这样安装它:
# Add the sid repository
sudo mv /tmp/sid.list /etc/apt/sources.list.d/
# Error: can't install because version conflicts of libc6:
# sudo apt-get install ibus-sunpinyin
# This is ok but it will upgrade a lot of mess from sid branch:
# sudo apt-get upgrade ibus-sunpinyin
# So, instead of apt-get install/upgrade, let me download & install the single package.
# However, this errored again because of version conflicts of libc6:
# apt-get install --download-only ibus-sunpinyin
## THEN, WHAT CAN I DO? ##
# Remove the sid repository.
sudo mv /etc/apt/sources.list.d/sid.list /tmp
# Install the single package.
sudo dpkg -i ./ibus-sunpinyin-x.x.x.deb
Run Code Online (Sandbox Code Playgroud)
小智 5
一种简单的方法是设置首选项,以便系统使用stable大多数包,但回退到testing或unstable丢失的包。
步骤如下:
将其添加到/etc/apt/sources.list:
deb http://deb.debian.org/debian buster main
deb http://deb.debian.org/debian testing main non-free contrib
deb http://deb.debian.org/debian unstable main non-free contrib
Run Code Online (Sandbox Code Playgroud)
将其写入/etc/apt/preferences(或创建文件)
Package: *
Pin: release a=stable
Pin-Priority: 700
Package: *
Pin: release a=testing
Pin-Priority: 650
Package: *
Pin: release a=unstable
Pin-Priority: 600
Run Code Online (Sandbox Code Playgroud)
跑步apt-get update
安装你想要的包(例如apt-get install ibus-sunpinyin)
PS:您可以使用以下命令强制安装不稳定的软件包apt-get install <package>/unstable
您还可以尝试从 sid 存储库下载源包,并在您的 freeze 系统上构建它们。如果有很多依赖项,或者包依赖于在squeeze中不可用的库版本,您可能会遇到麻烦。
如果这有效,那么您不需要像使用引导方法那样在单独的文件夹中维护另一个发行版。
| 归档时间: |
|
| 查看次数: |
18958 次 |
| 最近记录: |