LPIC-2 System Security Practice Question
Network Topology
Given the exhibit, what is the most likely reason for the GPG error, and what is the correct way to fix it permanently?
⚠ Common exam trap
Many exam-takers confuse a missing GPG key with a corrupted file or an incorrect repository URL, but the GPG error message explicitly mentions 'NO_PUBKEY', which directly points to a missing public key.
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 public key is missing; obtain and add it with 'apt-key add' or 'wget -O- | apt-key add -'
The GPG error indicates that the repository's Release file is signed but the system lacks the corresponding public key to verify the signature. This is a common issue when adding third-party repositories. The correct permanent fix is to obtain the missing public key and add it to the APT keyring using 'apt-key add' or by piping the key with 'wget -O- | apt-key add -', which allows APT to authenticate the repository's metadata.
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 not signed; use '--allow-unauthenticated' permanently in /etc/apt/apt.conf.d/
Why it's wrong here
This bypasses security permanently, not recommended.
- ✗
The repository URL is incorrect; change 'http://deb.example.com' to 'https://deb.example.com'
Why it's wrong here
HTTPS would not fix missing public key.
- ✗
The InRelease file is corrupted; remove it and run 'apt-get update' again
Why it's wrong here
The file is likely fine; the key is missing.
- ✓
The public key is missing; obtain and add it with 'apt-key add' or 'wget -O- | apt-key add -'
Why this is correct
Adding the correct public key resolves the error.
Go deeper
Related to this question
About these practice questions
This LPIC-2 question is part of Courseiva's 507-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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-2 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-2 exam.