[ 이전 ] [ 차례 ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 7 ] [ 8 ] [ 9 ] [ 다음 ]

APT HOWTO
4 - 패키지에 대한 정보 얻기


설치가 가능하거나 이미 설치되었거나 어떤 패키지가 어느 섹션에 있는지 우선 순위가 어떻게 되는지 패키지에 설명이 무엇인지 등에 관해서 패키지에 대한 내용을 쉽게 얻을 수 있게 도와주는 것이 APT 시스템의 프론트엔드 프로그램 들이다.

하지만 우리의 목적은 순수한 APT를 사용하는 방법을 배우는 것이다. 설치하고자 하는 패키지의 이름을 어떻게 찾을 수 있나?

이러한 작업을 위해서는 수많은 리소스가 있다. apt-cache부터 시작하자. 이 프로그램은 APT 시스템에서 이용되는 것으로 APT의 데이타 베이스를 유지하는데 이용된다. 더욱더 유용한 어플리케이션에 대해서 잠시 살펴볼 것이다.


4.1 패키지 이름 찾아내기

예를 들어 Atari 2600를 사용하고 싶은 경우에 Atari 에뮬레이터를 설치하여 사용하고자 하고 몇개의 게임을 다운로드 하고자 한다면. 이렇게 할 수 있다:

     [root]@[/] # apt-cache search atari
     atari-fdisk-cross - Partition editor for Atari (running on non-Atari)
     circuslinux - The clowns are trying to pop balloons to score points!
     madbomber - A Kaboom! clone
     tcs - Character set translator.
     atari800 - Atari emulator for svgalib/X/curses
     stella - Atari 2600 Emulator for X windows
     xmess-x - X binaries for Multi-Emulator Super System

우리가 찾고자 하는 것과 관계된 몇개의 패키지를 간단한 설명과 함께 찾고자 한다. 특정 패키지에 대한 자세한 정보를 얻고자 하려면 이를 이용할 수 있다:

     [root]@[/] # apt-cache show stella  
     Package: stella
     Priority: extra
     Section: non-free/otherosfs
     Installed-Size: 830
     Maintainer: Tom Lear <tom@trap.mtview.ca.us>
     Architecture: i386
     Version: 1.1-2
     Depends: libc6 (>= 2.1), libstdc++2.10, xlib6g (>= 3.3.5-1)
     Filename: dists/potato/non-free/binary-i386/otherosfs/stella_1.1-2.deb
     Size: 483430
     MD5sum: 11b3e86a41a60fa1c4b334dd96c1d4b5
     Description: Atari 2600 Emulator for X windows
      Stella is a portable emulator of the old Atari 2600 video-game console
      written in C++.  You can play most Atari 2600 games with it.  The latest
      news, code and binaries for Stella can be found at:
      http://www4.ncsu.edu/~bwmott/2600

이 결과에서 보면 우리가 설치하고자 하거나 설치하고자 하지 않는 패키지에 대한 많은 자세한 정보를 패키지의 설명과 함께 자세히 나와있다. 패키지가 이미 여러분의 시스템에 설치되어 있고 새로운 버젼이라면 무든 버젼에 관한 정보도 볼 수 있다. 예를 들면:

     [root]@[/] # apt-cache show lilo
     Package: lilo
     Priority: important
     Section: base
     Installed-Size: 271
     Maintainer: Russell Coker <russell@coker.com.au>
     Architecture: i386
     Version: 1:21.7-3
     Depends: libc6 (>= 2.2.1-2), debconf (>=0.2.26), logrotate
     Suggests: lilo-doc
     Conflicts: manpages (<<1.29-3)
     Filename: pool/main/l/lilo/lilo_21.7-3_i386.deb
     Size: 143052
     MD5sum: 63fe29b5317fe34ed8ec3ae955f8270e
     Description: LInux LOader - The Classic OS loader can load Linux and others
      This Package contains lilo (the installer) and boot-record-images to
      install Linux, OS/2, DOS and generic Boot Sectors of other OSes.
      .
      You can use Lilo to manage your Master Boot Record (with a simple text screen)
      or call Lilo from other Boot-Loaders to jump-start the Linux kernel.
     
     Package: lilo
     Status: install ok installed
     Priority: important
     Section: base
     Installed-Size: 190
     Maintainer: Vincent Renardias <vincent@debian.org>
     Version: 1:21.4.3-2
     Depends: libc6 (>= 2.1.2)
     Recommends: mbr
     Suggests: lilo-doc
     Description: LInux LOader - The Classic OS loader can load Linux and others
      This Package contains lilo (the installer) and boot-record-images to
      install Linux, OS/2, DOS and generic Boot Sectors of other OSes.
      .
      You can use Lilo to manage your Master Boot Record (with a simple text screen)
      or call Lilo from other Boot-Loaders to jump-start the Linux kernel.

리스트의 첫번째 부분은 가용한 패키지를 의미하고 두번째는 설치되어 있는 버젼이다. 패키지에 대한 일반적인 정보를 얻으려면 다음과 같다:

     [root]@[/] # apt-cache showpkg penguin-command
     Package: penguin-command
     Versions: 
     1.4.5-1(/var/lib/apt/lists/download.sourceforge.net_debian_dists_unstable_main_binary-i386_Packages)(/var/lib/dpkg/status)
     
     Reverse Depends: 
     Dependencies: 
     1.4.5-1 - libc6 (2 2.2.1-2) libpng2 (0 (null)) libsdl-mixer1.1 (2 1.1.0) libsdl1.1 (0 (null)) zlib1g (2 1:1.1.3) 
     Provides: 
     1.4.5-1 - 
     Reverse Provides:

패키지가 어떤 패키지에 의존하고 있는지 찾으려면:

     [root]@[/] # apt-cache depends penguin-command
     penguin-command
       Depends: libc6
       Depends: libpng2
       Depends: libsdl-mixer1.1
       Depends: libsdl1.1
       Depends: zlib1g

요약하면 우리가 원하는 패키지 이름을 찾는데 이용하는 범위의 도구를 갖고 있는 셈이다.


4.2 Using dpkg to find package names

패키지 이름을 정하는 방법중의 한가지는 패키지내에서 발견된 중요한 파일들의 이름을 아는 것이다. 예를 들면 컴파일에 필요한 특정한 ".h" 파일을 제공하는 패키지를 찾기 위해서는 다음을 실행한다:

     [root]@[/] # dpkg -S stdio.h
     libc6-dev: /usr/include/stdio.h
     libc6-dev: /usr/include/bits/stdio.h
     perl: /usr/lib/perl/5.6.0/CORE/nostdio.h

or:

     [root]@[/] # dpkg -S /usr/include/stdio.h
     libc6-dev: /usr/include/stdio.h

여러분의 시스템에 설치되어 있는 유용한 패키지의 이름을 찾기 위해서 하드드라이브를 정리할 계획이라면 다음을 실행하라:

     [root]@[/] # dpkg -l | grep mozilla
     ii  mozilla-browse 0.8-0.1        Mozilla Web Browser

이 명령의 문제점은 패키지 이름이 "잘릴 수" 있다는 것이다. 위의 예에서 패키지의 정확한 이름은 mozilla-browser이다. 이를 수정하기 위해서는 패키지 설명을 이용하거나 그 일부를 이용해서 정확한 이름을 알 수 있다:

     [root]@[/] # apt-cache search "Mozilla Web Browser"
     mozilla-browser - Mozilla Web Browser

4.3 "on demand" 패키지 설치하는 방법

프로그램을 컴파일 하고 있는데 멈춰버렸다! 이는 여러분이 필요한 .h 파일이 없기 때문이다. auto-apt은 그러한 상황을 막아줄 것이다. 필요한 패키지라면 그 패키지를 설치하라고 하고 과정을 멈추고 패키지가 설치된 후에 과정을 계속 진행해 나갈 것이다.

여러분이 기본적으로 할 일은 다음을 실행하는 것이다:

     auto-apt run command

`command'라는 것은 없을지 모를 파일이 필요한 실행명령이다:

     auto-apt run ./configure

필요한 패키지들을 설치하도록 요구하고 따라서 자동적으로 apt-get을 호출한다. X를 실행하면 그래픽 인터페이스가 기본 텍스트 인터페이스를 대체할 것이다.

Auto-apt은 효율적으로 최신으로 데이타베이스를 유지한다. 이는 다음의 명령을 통해서 가능하다:auto-apt update, auto-apt updatedb와 auto-apt update-local.


4.4 패키지의 변화된 정보를 얻기

모든 패키지는 자신의 문서 디렉토리(/usr/share/doc/packagename)에 changelog.Debian.gz라는 파일이 있는데 마지막 버젼이후로 패키지의 변화된 내용을 포함하고 있다. zless의 도움을 받아 이러한 파일을 읽을 수 있지만 그리 쉽지는 않고 전체 시스템 업그레이드 하자마자 모든 업그레이드 된 changelog를 찾기 시작한다.

이러한 작업을 자동화 해주는 방법이 있는데 apt-listchanges을 이용하면 된다. 우선은 apt-listchanges 패키지를 우선 설치하고 패키지 설치동안 Debconf가 이를 설정해 줄것이다. 여러분이 원하는대로 질문에 답을 하면 된다.

"Should apt-listchanges be automatically run by apt?"라는 것은 매우 유용한데 업그레이드 동안 apt에 의해 설치되는 각 패키지의 변화 목록을 보여주게 해주기 때문이다. 그리고 계속 진행하기 전에 이를 분석하게 해준다. "Should apt-listchanges prompt for confirmation after displaying changes?"는 여러분이 변화의 내용을 읽은 후에 설치를 계속할 것인지를 묻기 때문이다. 계속 원하지 않는다고 하면 apt-listchanges를 에러를 apt는 설치를 중단하게 된다.

apt-listchanges가 설치된 이후애 apt에 의해서 패키지가 다운로드 되거나 CD에서 가지고 오거나 마운트된 디스크에서 가져오자 마자 설치되기 전에 패키지에 변화된 내용의 리스트를 보여주게 된다.


[ 이전 ] [ 차례 ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 7 ] [ 8 ] [ 9 ] [ 다음 ]

APT HOWTO

1.7.3 - 2001년 9월 September 2001
Gustavo Noronha Silva kov@debian.org
한국어 번역: 양유성 yooseong@debian.org