GrepBoard/매뉴얼
605 편 ·

Rocky 9 dnf Unable to find a match 해결

·시험 환경 Rocky Linux 9.3 · dnf 4.14.0 · epel-release 9-10 (Docker) · 2026-10·시험 범위 ↓·5 단계

dnf 의 Error: Unable to find a match 는 켜진 저장소에 그 이름이 없다는 뜻입니다. EPEL·CRB 꺼짐, 명령 이름, exclude 를 repolist·provides 로 가릅니다.

output
No match for argument: htopError: Unable to find a match: htop

지금 켜진 저장소 어디에도 그 이름의 패키지가 없다는 뜻입니다. Rocky 9 기본 저장소(BaseOS·AppStream·Extras)에 없는 패키지는 대개 EPEL 이나 CRB 에 있고, 그 밖에는 명령 이름을 넣었거나 exclude 로 가려진 경우입니다. 바로 위 줄이 어느 경우인지 알려 줍니다.

[1] 켜진 저장소를 봅니다. enabled 가 셋뿐이면 EPEL 도 CRB 도 없는 상태입니다.

console
# dnf repolist --allrepo id                 repo name                                       statusappstream               Rocky Linux 9 - AppStream                       enabledbaseos                  Rocky Linux 9 - BaseOS                          enabledcrb                     Rocky Linux 9 - CRB                             disabledextras                  Rocky Linux 9 - Extras                          enabled

(debug·source 등 꺼진 저장소 줄은 줄였습니다.) crb 는 Rocky 가 함께 내는 저장소지만 기본으로 꺼져 있습니다.

[2] htop 같은 흔한 도구는 EPEL 에 있습니다. epel-release 는 Extras 저장소에 있어 바로 설치됩니다. 처음 설치할 때 패키지가 CRB 를 같이 켜라고 안내합니다.

console
# rpm -q --scripts epel-releasepostinstall scriptlet (using /bin/sh):# Doing a check to see if crb is enabled is as hard and resource intense as enabling or disabling crb.#   So we will say crb is recommended, without first checking.  But only on the initial install.if [ "$1" -eq 1 ] ; then  echo "Many EPEL packages require the CodeReady Builder (CRB) repository."  echo "It is recommended that you run /usr/bin/crb enable to enable the CRB repository."fi
console
# dnf -y install epel-release# dnf -y install htop# rpm -q htophtop-3.3.0-1.el9.x86_64

[3] 빌드 도구·개발 헤더는 CRB 에 있는 경우가 많습니다. ninja-build 는 CRB 를 켜기 전에는 같은 오류가 납니다.

console
# dnf -y install ninja-buildNo match for argument: ninja-buildError: Unable to find a match: ninja-build# dnf -q repoquery --disablerepo="*" --enablerepo=crb ninja-build 2>&1 | head -2ninja-build-0:1.10.2-6.el9.x86_64

--enablerepo=crb 를 한 번만 붙이면 켜지 않고도 그 저장소를 뒤져 볼 수 있습니다. 계속 쓸 거면 켭니다. 최소 설치·컨테이너에는 config-manager 가 없으므로 dnf-plugins-core 를 먼저 넣습니다(epel-release 를 설치했다면 이미 들어와 있고, 패키지가 안내한 crb enable 도 됩니다).

console
# dnf -y -q install dnf-plugins-core && dnf config-manager --set-enabled crb && dnf repolist | grep -i crbcrb                 Rocky Linux 9 - CRB# dnf -y -q install ninja-build && rpm -q ninja-buildninja-build-1.10.2-6.el9.x86_64

되돌릴 때는 dnf config-manager --set-disabled crb 입니다.

[4] 명령 이름을 넣었는지 봅니다. ifconfig 는 명령이고 패키지는 net-tools 입니다. dnf provides 에 파일 경로를 주면 패키지를 찾습니다. 경로 앞은 */ 로 열어 둡니다.

console
# dnf -y install ifconfigNo match for argument: ifconfigError: Unable to find a match: ifconfig# dnf -q provides "*/ifconfig"net-tools-2.0-0.64.20160912git.el9.x86_64 : Basic networking toolsRepo        : baseosMatched from:Filename    : /usr/sbin/ifconfig

이름의 대소문자도 구분합니다(dnf install HTOP 은 EPEL 이 켜져 있어도 같은 오류).

[5] 이름이 맞는데도 안 되면 exclude 를 봅니다. 이때는 위 줄의 문구가 다릅니다.

console
# dnf -y --exclude=nano install nanoAll matches were filtered out by exclude filtering for argument: nanoError: Unable to find a match: nano

/etc/dnf/dnf.conf 의 exclude= 줄이나 저장소 파일(/etc/yum.repos.d/*.repo)의 excludepkgs=·includepkgs= 를 찾습니다. 아래는 dnf.conf 에 exclude=nano 를 넣은 상태입니다. 어느 파일의 어느 줄인지가 나오면 main(dnf.conf)인지 저장소 하나인지 갈립니다.

console
# grep -rn -e '^exclude' -e '^excludepkgs' -e '^includepkgs' /etc/dnf/dnf.conf /etc/yum.repos.d//etc/dnf/dnf.conf:7:exclude=nano

이유를 확인해 설치해도 된다고 판단했으면, 제한을 그 범위만 풀고 --assumeno 로 무엇이 바뀌는지 먼저 봅니다(아무것도 설치하지 않습니다). --disableexcludes 는 main(dnf.conf) · 저장소 ID · all 중 하나를 받고, 문서상 exclude 뿐 아니라 includepkgs 도 풉니다(dnf 명령 문서). all 은 모든 저장소의 제한을 풀어 의존 패키지까지 바뀔 수 있으므로, 위 grep 이 가리킨 곳만 지정합니다.

console
# dnf --disableexcludes=main --assumeno install nano 2>&1 | grep -E '^(Installing|Install|Upgrade|Operation)| nano 'Installing: nano           x86_64           5.6.1-7.el9             baseos           691 kInstall  1 PackageInstalled size: 2.7 MOperation aborted.

목록에 의도한 패키지만 있으면 같은 명령에서 --assumeno 를 빼고 실행합니다. 목록에 Upgrading:·다른 패키지가 끼어 있으면 설치하지 않습니다.

저장소 자체에 접속이 안 되면 문구가 Failed to download metadata 로 바뀝니다. 그때는 dnf Failed to download metadata 글을 봅니다. 설치 뒤 재시작 대상은 dnf needs-restarting 글로 확인합니다.

#dnf#epel#crb#rocky#repolist