데비안 시스템 및 파생 제품 :
$ dpkg --search /bin/ls
coreutils: /bin/ls
즉, 파일 /bin/ls
은이라는 데비안 패키지에 속합니다 coreutils
.
그러나 이것은 패키지가 설치된 경우에만 작동합니다. 그렇지 않은 경우 어떻게해야합니까?
답변
적절한 파일
apt-file
바이너리를 제공하는 패키지 ( Debian 또는 Ubuntu 와 같은)를 검색하는 기능을 제공하며 , 기본적으로 설치되지 않고 리포지토리에 설치됩니다.
apt-file search <path-to-file>
검색하기 전에 한 번 업데이트하고 싶을 수도 있습니다 …
apt-file update
예를 들어, 설치되지 않은 바이너리를 검색해 봅시다 mysqldump
.
$ apt-file search /usr/bin/mysqldump
mysql-client-5.1: /usr/bin/mysqldump
mysql-client-5.1: /usr/bin/mysqldumpslow
mysql-cluster-client-5.1: /usr/bin/mysqldump
mysql-cluster-client-5.1: /usr/bin/mysqldumpslow
설치되지 않은 패키지의 내용을 나열 할 수도 있습니다.
$ apt-file list mysql-client-5.1
mysql-client-5.1: /usr/bin/innochecksum
mysql-client-5.1: /usr/bin/innotop
mysql-client-5.1: /usr/bin/myisam_ftdump
mysql-client-5.1: /usr/bin/mysql_client_test
...
m
yum
설치되거나 설치되지 않은 바이너리를 검색 하는 명령 whatprovides
(또는 provides
)을 승인합니다 .
yum whatprovides <path-to-file>
다시, 설치되지 않은 mysqldump
:
$ yum whatprovides /usr/bin/mysqldump
mysql-5.1.51-2.fc14.i686 : MySQL client programs and shared libraries
Repo : fedora
Matched from:
Filename : /usr/bin/mysqldump
mysql-5.1.51-1.fc14.i686 : MySQL client programs and shared libraries
Repo : fedora
Matched from:
Filename : /usr/bin/mysqldump
사이퍼
zypper
의 search
명령은 -f
옵션 과 함께 사용될 때 파일 목록을 확인할 수 있습니다 .
zypper se -f /bin/mksh
Loading repository data...
Reading installed packages...
S | Name | Summary | Type
--+------+-------------------+--------
| mksh | MirBSD Korn Shell | package
Webpin 은 웹 기반 솔루션을 제공하며 명령 줄을위한 스크립트 도 있습니다.
pkgfile
로 사용할 수 pkgtools
에 대한 pacman
기반 시스템. 위의 다른 것과 유사한 검색 기능을 제공합니다.
$ pkgfile -si /usr/bin/mysqldump
Name : mysql-clients
Version : 5.1.54-1
Url : http://www.mysql.com/
License : GPL
Depends : libmysqlclient
...
답변
이를위한 표준 도구는 apt-file 입니다. apt-file update
색인 파일을 다운로드하려면 실행하십시오 . 출력은 다음과 같습니다.
Downloading complete file ftp://ftp.is.co.za/debian/dists/squeeze/Contents-i386.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 16.6M 100 16.6M 0 0 33191 0 0:08:47 0:08:47 --:--:-- 38951
그런 다음을 실행하십시오 apt-file search search_term
.
답변
당신이 컴퓨터에 액세스 할 수없는 또는 이전 답변에 주어진 명령을 사용할 수없는 경우, 당신은 또한 사용하여이를 찾을 수 있습니다 데비안 패키지 웹 기반 검색 엔진 “(두 번째 양식을 패키지의 내용을 검색 ” ).