/
CentOS 에서 파일이 어떤 패키지에 속해 있는지 알아내기
CentOS 에서 파일이 어떤 패키지에 속해 있는지 알아내기
yum provides 사용
yum 은 provides 명령어를 제공하므로 특정 파일이 어떤 패키지에서 제공되는지 확인할 수 있습니다.
예로 다음 명령어로 gcc 를 제공하는 패키지명을 알수 있습니다.
$ sudo yum provides '/usr/bin/gcc' Last metadata expiration check: 2:27:08 ago on Tue 23 Feb 2021 11:51:48 AM UTC. gcc-8.2.1-3.5.el8.x86_64 : Various compilers (C, C++, Objective-C, ...) Repo : rhel-8-appstream-rhui-rpms Matched from: Filename : /usr/bin/gcc gcc-8.3.1-4.5.el8.x86_64 : Various compilers (C, C++, Objective-C, ...) Repo : rhel-8-appstream-rhui-rpms Matched from: Filename : /usr/bin/gcc
경로를 특정하지 않고 gcc 를 찾을 경우 * 을 사용하면 됩니다. 다음 명령어는 gcc 라는 파일을 제공하는 모든 패키지를 출력합니다.
$ sudo yum provides '*/gcc' gcc-toolset-9-libubsan-devel-9.2.1-2.3.el8.i686 : The Undefined Behavior Sanitizer static library Repo : rhel-8-appstream-rhui-rpms Matched from: Filename : /opt/rh/gcc-toolset-9/root/usr/lib/gcc gcc-toolset-9-libubsan-devel-9.2.1-2.3.el8.x86_64 : The Undefined Behavior Sanitizer static library Repo : rhel-8-appstream-rhui-rpms Matched from: Filename : /opt/rh/gcc-toolset-9/root/usr/lib/gcc
rpm query 사용
이미 설치되어 있는 파일이 속한 패키지를 알아낼 경우 rpm 의 query 명령어를 사용하면 됩니다.
예로 다음 rpm -qf 명령어로 /etc/sysctl.conf 파일을 제공하는 패키지를 알수 있습니다.
$ rpm -qf /etc/sysctl.conf systemd-239-41.el8_3.x86_64
같이 보기
, multiple selections available,
Related content
yum-cron 으로 시스템 자동 업데이트
yum-cron 으로 시스템 자동 업데이트
More like this
yum 트랜잭션 및 롤백
yum 트랜잭션 및 롤백
More like this
지원 종료된 CentOS 6 저장소(Repository) 설정하기
지원 종료된 CentOS 6 저장소(Repository) 설정하기
More like this
RHEL/CentOS 7 에 MariaDB 10.4 설치하기
RHEL/CentOS 7 에 MariaDB 10.4 설치하기
More like this
aureport 명령어로 리눅스의 audit daemon log 보기
aureport 명령어로 리눅스의 audit daemon log 보기
More like this
yumdownloader 명령어로 yum 패키지를 설치하지 않고 download 만 하기
yumdownloader 명령어로 yum 패키지를 설치하지 않고 download 만 하기
More like this