본문 바로가기

컴퓨터 관련/문제해결

Kali Linux에서 apt가 되지 않을 때, 시도 할 수 있는 방법

728x90
반응형
  • 방법1: 네트워크 연결을 확인해 본다.
    • Kali Linux는 가상머신에서 구동하는 경우가 많으므로, 인터넷 설정이 잘못되어 저장소에 접근하지 못할 수 있다.
    • 따라서, 인터넷 연결이 되는지를 확인해 본다. 그래도 안되면, 아래 두 방법을 차례로 시도해본다.

  • 방법2: /etc/apt/source.list를 변경하여, 다운 받을 주소를 변경한다.
    • 다음과 같은 명령어를 사용하여 변경할 수 있다.
      • 일반적인 저장소(kali-roling)로 변경
        echo "deb http://http.kali.org/kali kali-rolling main contrib non-free non-free-firmware" | sudo tee /etc/apt/sources.list
      • 안정화된 저장소(kali-last-snapshot)으로 변경
        echo "deb http://http.kali.org/kali kali-last-snapshot main contrib non-free non-free-firmware" | sudo tee /etc/apt/sources.list
    • 더 자세한 내용을 알고 싶으면, 아래 주소를 참고하면 된다.
 

Kali Network Repositories (/etc/apt/sources.list) | Kali Linux Documentation

The topic of repositories is always a large one, and comes up frequently. It is an item which people often get wrong and confused with. Please take the time to read the information below and any references which is linked to before acting on anything. Defa

www.kali.org


  • 방법3: 주소를 http가 아닌 https로 변경한다.
    • 방법: /etc/apt/source.list에서 접근 프로토콜이 http로 되어 있는 경우가 있다. “https”로 변경하면 정상적으로 접근할 수 있다.
      • 예시
      • echo "deb https://http.kali.org/kali kali-rolling main contrib non-free non-free-firmware" | sudo tee /etc/apt/sources.list
    • 참고자료: https://linuxconfig.org/kali-linux-failed-to-fetch-inrelease-repository-fix

 

반응형