LPIC-1 Linux Installation and Package Management Practice Question
Exhibit
Refer to the exhibit. ``` $ cat /etc/yum.repos.d/custom.repo [custom] name=Custom Repository baseurl=http://repo.example.com/centos/$releasever/$basearch/ enabled=1 gpgcheck=1 gpgkey=http://repo.example.com/RPM-GPG-KEY-custom ``` $ yum repolist repo id repo name status custom Custom Repository 0
Based on the exhibit, the 'custom' repository shows 0 packages. What is the most likely cause?
⚠ Common exam trap
A common mix-up: candidates assume 'enabled=1' is mandatory or that GPG key issues cause repositories to be ignored, but the real culprit is variable expansion failure, which silently yields an empty package list without error messages.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The $releasever or $basearch variables are not expanding correctly, leading to an invalid URL
The 'custom' repository shows 0 packages because the $releasever or $basearch variables are not expanding correctly, resulting in an invalid or unreachable repository URL. Yum uses these variables to dynamically construct the baseurl, and if they are undefined or incorrect (e.g., due to a missing or misconfigured /etc/yum/vars/ directory or incorrect release version), the repository metadata cannot be downloaded, so yum reports 0 packages available.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The repository is disabled because 'enabled=1' is missing
Why it's wrong here
It is set to 1, so enabled.
- ✓
The $releasever or $basearch variables are not expanding correctly, leading to an invalid URL
Why this is correct
Variables may not be set or the repository doesn't exist for that release.
- ✗
The GPG key is missing, causing yum to ignore the repository
Why it's wrong here
GPG key affects package verification, not repository listing.
- ✗
The repository metadata is corrupt and needs to be regenerated
Why it's wrong here
If metadata were corrupt, yum would report an error.
Go deeper
Related to this question
About these practice questions
Courseiva writes every LPIC-1 question from scratch — 527 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This LPIC-1 practice question is part of Courseiva's free LPI certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the LPIC-1 exam.