apt-get update를 실행한 후 "KeyError: 'non-free-firmware'"가 나타납니다.

apt-get update를 실행한 후 "KeyError: 'non-free-firmware'"가 나타납니다.

다음 명령을 사용하여 업데이트를 실행합니다.

apt-get update

반품:

Hit:1 http://kali.download/kali kali-rolling InRelease
Traceback (most recent call last):
  File "/usr/lib/cnf-update-db", line 27, in <module>
    col.create(db)
  File "/usr/share/command-not-found/CommandNotFound/db/creator.py", line 95, in create
    self._fill_commands(con)
  File "/usr/share/command-not-found/CommandNotFound/db/creator.py", line 143, in _fill_commands
    self._parse_single_contents_file(con, f, fp.stdout)
  File "/usr/share/command-not-found/CommandNotFound/db/creator.py", line 282, in _parse_single_contents_file
    priority = component_priorities[component]
KeyError: 'non-free-firmware'
Reading package lists... Done
E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/lib/command-not-found/ -a -e /usr/lib/cnf-update-db; then /usr/lib/cnf-update-db > /dev/null; fi'

누군가 추적을 설명할 수 있나요?

답변1

Kali에 새로운 섹션이 있지만 non-free-firmware귀하의 버전에서는 command-not-found이에 대해 알지 못합니다(버전 23.04.0에 추가됨).

이 문제를 해결하려면 후크를 비활성화하십시오.

sudo mv /etc/apt/apt.conf.d/50command-not-found{,.disabled}

apt update그런 다음 정상적으로 실행할 수 있습니다 . 버전이 수정되면 command-not-found후크를 다시 활성화하세요.

sudo mv /etc/apt/apt.conf.d/50command-not-found{.disabled,}

답변2

nano를 사용하고 /etc/apt/sources.list에 'deb'를 추가하세요.http://http.kali.org/kali"deb" 이후 kali-last-snapshot 주요 기여http://http.kali.org/kalikali-rolling의 주요 기여는 무료가 아닙니다. 이 두 줄에 주석을 달고 저장한 후 다시 업데이트해 보세요. 행운을 빌어요.

관련 정보