우분투 20.04에서 압축 해제 및 zip 설치 실패를 수정하는 방법

우분투 20.04에서 압축 해제 및 zip 설치 실패를 수정하는 방법

Linux 터미널(Ubuntu 20.04)을 사용하여 zip을 설치하고 압축을 풀려고 했으나 결국 이 오류가 발생했습니다(첨부된 그림). 그 이유는 무엇입니까?

이 명령을 사용해 보았으나 결국 동일한 오류가 발생했습니다.

sudo apt-get update --fix-missing & sudo apt-get zip uzip --fix-missing.

에러 메시지:

**Err:1** http://archive.ubuntu.com/ubuntu focal/main amd64 unzip amd64 6.0-25ubuntu1
  Could not connect to archive.ubuntu.com:80 (2001:67c:1360:8001::23). - connect (111: Connection refused) Could not connect to archive.ubuntu.com:80 (2001:67c:1360:8001::24). - connect (111: Connection refused) Could not connect to archive.ubuntu.com:80 (91.189.88.152). - connect (111: Connection refused) Could not connect to archive.ubuntu.com:80 (91.189.88.142). - connect (111: Connection refused)
*Err:2* http://archive.ubuntu.com/ubuntu focal/main amd64 zip amd64 3.0-11build1
  Unable to connect to archive.ubuntu.com:http:
Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/z/zip/zip_3.0-11build1_amd64.deb  Unable to connect to archive.ubuntu.com:http:
E: Internal Error, ordering was unable to handle the media swap.

답변1

다음 문제를 해결할 수 있습니다.

1. 인터넷이 활성화되어 있는지 확인하세요.

  • ping 명령을 사용하여 연결을 확인하십시오.

예: 핑 8.8.8.8

제대로 작동한다면 파일의 네임서버를 확인하고, /etc/resolve.conf 8.8.8.8이 해결.conf에 없으면 해결.conf에 다음 줄을 추가하세요.

nameserver 8.8.8.8

또한 인터넷의 기본 경로를 확인하세요. 명령어를 통해 확인할 수 있습니다 ip r .

인터넷을 제공하는 인터페이스의 기본 경로가 있으면 괜찮습니다. 그렇지 않으면 다음 명령을 통해 경로를 추가할 수 있습니다.sudo ip r a default via <your gatway> dev <your-interface>

예: 192.168.2.1 dev eth0을 통한 sudo ip ra 기본값

그런 다음 zip 및 unzip과 같은 패키지를 설치해 보십시오.

2. 위의 방법 중 어느 것도 작동하지 않으면 프록시 사용 때문일 수 있습니다.

예 프록시를 사용하고 있습니다

m@m-Lenovo-ideapad-500-15ISK:~$ env | grep proxy
HTTP_PROXY=http://proxy.iiit.ac.in:8080/
FTP_PROXY=http://proxy.iiit.ac.in:8080/
https_proxy=http://proxy.iiit.ac.in:8080/
http_proxy=http://proxy.iiit.ac.in:8080/
ALL_PROXY=socks://proxy.iiit.ac.in:8080/
no_proxy=localhost,127.0.0.0/8,::1
HTTPS_PROXY=http://proxy.iiit.ac.in:8080/
all_proxy=socks://proxy.iiit.ac.in:8080/
ftp_proxy=http://proxy.iiit.ac.in:8080/

이제 sudo -E apt-get update이러한 환경 변수를 승격된 사용자에게 전달하므로 문제를 해결할 수 있습니다.

또는

그래서 이것을 ~/.bashrc 파일에 추가하겠습니다.

alias iiitproxy='export http_proxy="http://proxy.iiit.ac.in:8080"; export https_proxy="http://proxy.iiit.ac.in:8080";export ftp_proxy="http://proxy.iiit.ac.in:8080"; echo "Acquire::http::proxy \"http://proxy.iiit.ac.in:8080/\";" | sudo tee /etc/apt/apt.conf'

그런 다음 터미널에서 다음 명령을 실행합니다.

source ~/.bashrc 터미널을 새로 고치고,

iiitproxy

프록시를 사용하면 문제가 해결되었습니다.

관련 정보