R.A. Epigonos et al.

[debian] stable上にtestingのパッケージを一部インストールする方法

debianはよくできていて、stableだと古すぎるパッケージをtestingから借りてくることもできる。

apt設定にDefault-Releaseを設定

現在のapt設定でDefault-Releaseが設定されているか確認

# apt-config dump | grep 'APT::Default-Release'
APT::Default-Release "stable";

設定されていなければ、設定する。

# cat /etc/apt/apt.conf.d/99default-release
APT::Default-Release "stable";

apt source にtesting用レポジトリを追加

sources.list.d以下にレポジトリを書いたファイルを配置

# cat /etc/apt/sources.list.d/testing.list
deb http://deb.debian.org/debian/ bullseye main
deb-src http://deb.debian.org/debian/ bullseye main

apt cache のアップデート

# apt-get update
Hit:1 http://deb.debian.org/debian buster InRelease
Hit:2 http://deb.debian.org/debian buster-updates InRelease
Hit:3 http://security.debian.org/debian-security buster/updates InRelease
Hit:4 ********************* buster InRelease
Hit:5 http://deb.debian.org/debian bullseye InRelease
Reading package lists... Done

apt pinningでstableからのパッケージを優先

# cat /etc/apt/preferences.d/01stable.pref
Package: *
Pin: release a=stable
Pin-Priority: 900

必要なパッケージをtestingからインストール

パッケージ名の後に/testingなどをつければよいが、依存関係を解決できないためにインストールできないパッケージもある。

# apt-get install youtube-dl/bullseye

リファレンス

  1. Ubuntu Manpage: sources.list - List of configured APT data sources
  2. StableUpdates - Debian Wiki
  3. SELinux/Setup - Debian Wiki
  4. Debian -- sid の refpolicy ソースパッケージに関する詳細

ソーシャルブックマーク

  1. はてなブックマーク
  2. Google Bookmarks
  3. del.icio.us

ChangeLog

  1. Posted: 2007-09-14T02:26:08+09:00
  2. Modified: 2007-09-14T02:26:08+09:00
  3. Generated: 2023-08-27T23:09:13+09:00