및 testing
와 같은 Debian 브랜치에서 패키지를 설치하고 싶습니다 .tmux
git
그래서 APT를 구성했지만 testing
이를 main
기본값으로 사용했습니다.
nlykkei@debian-parallels ~ $ cat /etc/apt/sources.list.d/testing.list
deb http://deb.debian.org/debian/ testing main
deb-src http://deb.debian.org/debian/ testing main
nlykkei@debian-parallels ~ $ cat /etc/apt/preferences.d/testing.pref
Package: *
Pin: release a=testing
Pin-Priority: 100
tmux
이제 사용 가능한 버전을 확인하면 버전 3.1-c1
이 2.8-3
모두 표시됩니다. 이 경우에는 분명히 3.1c-1
에서 온 testing
것이지만 더 복잡한 출력에서 어떻게 식별합니까?
으로 apt-get install -t <branch> <pkg>...
설정된 지점 이름이 필요합니다 .Pin-Priority: 990
<branch>
apt-cache show
:
nlykkei@debian-parallels ~ $ apt-cache show tmux
Package: tmux
Version: 3.1c-1
Installed-Size: 830
Maintainer: Romain Francoise <[email protected]>
Architecture: amd64
Depends: libc6 (>= 2.27), libevent-2.1-7 (>= 2.1.8-stable), libtinfo6 (>= 6), libutempter0 (>= 1.1.5)
Description-en: terminal multiplexer
tmux enables a number of terminals (or windows) to be accessed and
controlled from a single terminal like screen. tmux runs as a
server-client system. A server is created automatically when necessary
and holds a number of sessions, each of which may have a number of
windows linked to it. Any number of clients may connect to a session,
or the server may be controlled by issuing commands with tmux.
Communication takes place through a socket, by default placed in /tmp.
Moreover tmux provides a consistent and well-documented command
interface, with the same syntax whether used interactively, as a key
binding, or from the shell. It offers a choice of vim or Emacs key
layouts.
Description-md5: dc6ff920cb9183a42694d0ea54835078
Homepage: https://tmux.github.io/
Tag: hardware::input:keyboard, implemented-in::c, interface::text-mode,
role::program, scope::application, works-with::software:running
Section: admin
Priority: optional
Filename: pool/main/t/tmux/tmux_3.1c-1_amd64.deb
Size: 362376
MD5sum: e0be6f85c58a244108eab29c9ee629cf
SHA256: 037f2f1f55c72e75e155cb54cdd9c41f4ac7575cef50a1427383b043cc8316e0
Package: tmux
Version: 2.8-3
Installed-Size: 681
Maintainer: Romain Francoise <[email protected]>
Architecture: amd64
Depends: libc6 (>= 2.27), libevent-2.1-6 (>= 2.1.8-stable), libtinfo6 (>= 6), libutempter0 (>= 1.1.5)
Description-en: terminal multiplexer
tmux enables a number of terminals (or windows) to be accessed and
controlled from a single terminal like screen. tmux runs as a
server-client system. A server is created automatically when necessary
and holds a number of sessions, each of which may have a number of
windows linked to it. Any number of clients may connect to a session,
or the server may be controlled by issuing commands with tmux.
Communication takes place through a socket, by default placed in /tmp.
Moreover tmux provides a consistent and well-documented command
interface, with the same syntax whether used interactively, as a key
binding, or from the shell. It offers a choice of vim or Emacs key
layouts.
Description-md5: dc6ff920cb9183a42694d0ea54835078
Homepage: https://tmux.github.io/
Tag: hardware::input:keyboard, implemented-in::c, interface::text-mode,
role::program, scope::application, works-with::software:running
Section: admin
Priority: optional
Filename: pool/main/t/tmux/tmux_2.8-3_amd64.deb
Size: 302084
MD5sum: 17d694a86ec7b0f46ac6ff60e0d843ff
SHA256: 9c247aef3c3c09d982d49a14091209d76bd06a3d2e699fc9d60ddcee203b456a
apt-cache policy
:
nlykkei@debian-parallels ~ $ apt-cache policy
Package files:
100 /var/lib/dpkg/status
release a=now
100 http://deb.debian.org/debian testing/main amd64 Packages
release o=Debian,a=testing,n=bullseye,l=Debian,c=main,b=amd64
origin deb.debian.org
500 http://deb.debian.org/debian buster-updates/main amd64 Packages
release o=Debian,a=stable-updates,n=buster-updates,l=Debian,c=main,b=amd64
origin deb.debian.org
500 http://security.debian.org/debian-security buster/updates/main amd64 Packages
release v=10,o=Debian,a=stable,n=buster,l=Debian-Security,c=main,b=amd64
origin security.debian.org
500 http://deb.debian.org/debian buster/main amd64 Packages
release v=10.9,o=Debian,a=stable,n=buster,l=Debian,c=main,b=amd64
origin deb.debian.org
Pinned packages:
고쳐 쓰다:
tmux:
Installed: 3.1c-1~bpo10+1
Candidate: 3.1c-1~bpo10+1
Version table:
*** 3.1c-1~bpo10+1 100
100 http://deb.debian.org/debian buster-backports/main amd64 Packages
100 /var/lib/dpkg/status
2.8-3 990
990 http://deb.debian.org/debian buster/main amd64 Packages
답변1
apt-cache show
설명하는 "분기"가 무엇인지는 알려주지 않지만 apt show
다음을 수행합니다.
$ apt show -a tmux
Package: tmux
Version: 3.1c-1
Priority: optional
Section: admin
Maintainer: Romain Francoise <[email protected]>
Installed-Size: 850 kB
Depends: libc6 (>= 2.27), libevent-2.1-7 (>= 2.1.8-stable), libtinfo6 (>= 6), libutempter0 (>= 1.1.5)
Homepage: https://tmux.github.io/
Tag: hardware::input:keyboard, implemented-in::c, interface::text-mode,
role::program, scope::application, works-with::software:running
Download-Size: 362 kB
APT-Sources: http://deb.debian.org/debian testing/main amd64 Packages
Description: terminal multiplexer
tmux enables a number of terminals (or windows) to be accessed and
controlled from a single terminal like screen. tmux runs as a
server-client system. A server is created automatically when necessary
and holds a number of sessions, each of which may have a number of
windows linked to it. Any number of clients may connect to a session,
or the server may be controlled by issuing commands with tmux.
Communication takes place through a socket, by default placed in /tmp.
Moreover tmux provides a consistent and well-documented command
interface, with the same syntax whether used interactively, as a key
binding, or from the shell. It offers a choice of vim or Emacs key
layouts.
Package: tmux
Version: 2.8-3
Priority: optional
Section: admin
Maintainer: Romain Francoise <[email protected]>
Installed-Size: 697 kB
Depends: libc6 (>= 2.27), libevent-2.1-6 (>= 2.1.8-stable), libtinfo6 (>= 6), libutempter0 (>= 1.1.5)
Homepage: https://tmux.github.io/
Tag: hardware::input:keyboard, implemented-in::c, interface::text-mode,
role::program, scope::application, works-with::software:running
Download-Size: 302 kB
APT-Manual-Installed: yes
APT-Sources: http://deb.debian.org/debian buster/main amd64 Packages
Description: terminal multiplexer
tmux enables a number of terminals (or windows) to be accessed and
controlled from a single terminal like screen. tmux runs as a
server-client system. A server is created automatically when necessary
and holds a number of sessions, each of which may have a number of
windows linked to it. Any number of clients may connect to a session,
or the server may be controlled by issuing commands with tmux.
Communication takes place through a socket, by default placed in /tmp.
Moreover tmux provides a consistent and well-documented command
interface, with the same syntax whether used interactively, as a key
binding, or from the shell. It offers a choice of vim or Emacs key
layouts.
다음 줄을 찾으세요 APT-Sources
. 정보가 해당하는 저장소를 나타냅니다.
답변2
이제 거의 충분히 먹었습니다 apt-cache policy
. 명령줄에 패키지 이름을 추가하기만 하면 됩니다.
이를 사용 apt-cache policy [package...]
하여 설치된 버전, 기본 설치 후보 및 설치 가능한 모든 버전( sources.list
파일 및 고정 구성 또는 APT::Default-Release
설정을 기반으로 함)을 표시할 수 있습니다.
예를 들어, 내 시스템 중 하나에서 기본 구성은 sid
aka ( my 의 행 unstable
으로 인해 )를 사용하는 것이며 다음에서 패키지를 선택할 수도 있습니다 .APT::Default-Release "unstable";
/etc/apt/apt.conf
experimental
$ apt-cache policy tmux
tmux:
Installed: 3.1c-1
Candidate: 3.1c-1
Version table:
3.2~rc4-1 1
1 http://ftp.au.debian.org/debian experimental/main amd64 Packages
*** 3.1c-1 990
990 http://ftp.au.debian.org/debian unstable/main amd64 Packages
100 /var/lib/dpkg/status
"설치됨"은 현재 설치된 버전입니다. "후보"는 적절한 구성에 따라 설치할 수 있는 버전입니다(이 경우 후보 버전은 이미 설치되어 있습니다). "버전 테이블"에는 사용 가능한 모든 버전이 표시됩니다.
sources.list
다른 버전은 정확한 버전 번호나 파일 중 하나에 정의된 대상 버전을 지정하여 설치할 수 있습니다 . 예를 들어 안정, 테스트, sid, 실험적 또는 "stretch" 또는 "buster"와 같은 특정 Debian 버전의 이름입니다.
예를 들어 다음 중 하나입니다.
apt install tmux=3.2~rc4-1
apt -t experimental install tmux
apt install tmux/experimental
apt-cache policy
그런데 이 옵션을 사용하여 표시된 설치 후보를 무시할 수도 있습니다 -t target_release
. 이는 명령줄에서 실행하는 것보다 스크립트에서 더 유용할 수 있으므로 grep -oP '^ +Candidate: \K.*'
후보 빌드를 쉽게 사용하거나 추출할 수 있습니다 awk -F': ' '/^ +Candidate:/ {print $2}'
.