apt를 사용합니다. 그것을 설치하면 APT가 패키지를 안전하게 업데이트하고 설치할 수 있습니다. 리포지토리 검증 오류 - 문제 : APT 업데이트를 실행할 때 다음과 같은 오류가 표시됩니다.
솔루션 : -
이 오류는 GPGV가 누락되었거나 저장소 키가 신뢰되지 않기 때문에 발생합니다. 다음 단계를 따르십시오 : GPGV 설치 (위의 솔루션 2 참조).
- 패키지 목록 업데이트 :
-
왜 작동 하는가 :
gpgv는 패키지의 진정성을 확인하기 위해 필요합니다. 그것 없이는 Apt가 패키지 목록을 안전하게 업데이트 할 수 없습니다. chroot 내부의 네트워크 문제 문제 : Hit:1 http://deb.debian.org/debian bookworm InRelease
Hit:2 http://deb.debian.org/debian bookworm-updates InRelease
0% [Connecting to security.debian.org (2a04:4e42:400::644)]/usr/bin/apt-key: 95: cannot create /dev/null: Permission denied
/usr/bin/apt-key: 95: cannot create /dev/null: Permission denied
/usr/bin/apt-key: 95: cannot create /dev/null: Permission denied
E: gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
Err:1 http://deb.debian.org/debian bookworm InRelease
gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
0% [Waiting for headers]/usr/bin/apt-key: 95: cannot create /dev/null: Permission denied
/usr/bin/apt-key: 95: cannot create /dev/null: Permission denied
/usr/bin/apt-key: 95: cannot create /dev/null: Permission denied
E: gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
Err:2 http://deb.debian.org/debian bookworm-updates InRelease
gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
Hit:3 http://security.debian.org/debian-security bookworm-security InRelease
0% [Working]/usr/bin/apt-key: 95: cannot create /dev/null: Permission denied
/usr/bin/apt-key: 95: cannot create /dev/null: Permission denied
/usr/bin/apt-key: 95: cannot create /dev/null: Permission denied
E: gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
Err:3 http://security.debian.org/debian-security bookworm-security InRelease
gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://deb.debian.org/debian bookworm InRelease: gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://deb.debian.org/debian bookworm-updates InRelease: gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://security.debian.org/debian-security bookworm-security InRelease: gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
W: Failed to fetch http://deb.debian.org/debian/dists/bookworm/InRelease gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
W: Failed to fetch http://deb.debian.org/debian/dists/bookworm-updates/InRelease gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
W: Failed to fetch http://security.debian.org/debian-security/dists/bookworm-security/InRelease gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
W: Some index files failed to download. They have been ignored, or old ones used instead.
와 같은 APT 업데이트와 같은 명령은 다음과 같은 네트워크 오류로 실패합니다. 솔루션 :
Chroot 환경은 호스트의 네트워크 구성에 액세스 할 수 없을 수 있습니다. 이 문제를 해결하려면 호스트의 DNS 설정을 chroot에 복사하십시오 : 이것이 작동하는 이유 : resolv.conf 파일에는 DNS 설정이 포함되어 있습니다. 호스트에서 복사하면 chroot가 도메인 이름을 해결할 수 있습니다. 필수 패키지 누락
문제 : LS 또는 Bash와 같은 기본 명령은 chroot 내부에서 작동하지 않습니다. 솔루션 :
Coreutils 및 Bash와 같은 필수 패키지를 설치합니다 :
sudo mount --bind /dev /path/to/chroot/dev이 작동 이유
모든 필수 패키지를 포함하지 않을 수 있습니다. 그것들을 설치하면 chroot가 작동하는지 확인합니다. Unmounting /dev After Use
sudo mount --bind /dev ~/debian-chroot/dev/
Problem:After using the chroot, you forget to unmount /dev, leaving the host’s /dev directory bound.Solution:Always unmount /dev when you’re done with the chroot:
Unmounting /dev ensures that the host’s /dev directory is not left in an inconsistent 상태.
7. -include와 함께 mmdebstrap을 사용하여 문제 :
chroot를 만드는 후 같은 패키지 (예 : GPGV, GNUPG)를 자주 설치해야합니다. 솔루션 : root filesystem의 생성 에서이 패키지를 포함시킵니다. 생성 과정에서 설치할 추가 패키지를 지정하여 시간과 노력을 절약 할 수 있습니다. 테스트 후 청소
gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
문제 : chroot 디렉토리는 디스크 공간을 차지하고 테스트 후 삭제하는 것을 잊어 버립니다.
솔루션 : 항상 chroot 디렉토리를 삭제합니다. 청소.
9. 프로세스 자동화 (옵션) 문제 :
chroots를 자주 생성하고 테스트하고 프로세스를 자동화하려고합니다. 솔루션 :
chroots의 생성, 테스트 및 정리를 자동화하기 위해 스크립트를 작성하십시오. 예를 들어
이 스크립트를 mmdebstrap-test.sh로 저장하고 chmod x mmdebstrap-test.sh로 실행 가능하게 만들고 실행할 수 있습니다. 이 문제 해결 가이드를 따르면 일반적인 문제를 신속하게 해결하고 다시 일할 수 있습니다. 기억 : Chroot 내부의 MANT /DEV. 패키지 검증을 위해 gpgv를 설치하십시오. - 필요한 경우 호스트의 DNS 설정을 복사하십시오. 디스크 공간을 자유롭게하기 위해 테스트 한 후 청소하십시오.
- 이 팁을 사용하여 Mmdeb Explatly를 사용할 수 있습니다.