🚨

APT 설치 에러 해결 방법

Tags
Ubuntu
ID matched
Created
Jul 7, 2023 02:54 PM
Last Updated
Last updated July 15, 2023
 
 
 
 

에러 예시

  • apt 설치 진행시 다음의 메시지와 유사한 로그가 출력된다
    • notion image
      ✘ ubuntu@ubuntu-XPS-15-9570  ~  sudo apt install git Reading package lists... Done Building dependency tree Reading state information... Done git is already the newest version (1:2.17.1-1ubuntu0.18). You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies: nvidia-cuda-toolkit : Depends: nvidia-cuda-dev (= 9.1.85-3ubuntu1) but it is not going to be installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
 
 

해결 방법

  • 다음과 같은 명령어를 순서대로 입력한다
    • # update your package list like this sudo apt-get update # then cleanup any partial packages sudo apt-get autoclean # Now clean the apt cache sudo apt-get clean # Now remove any unnecessary dependancies sudo apt-get autoremove # from the command above, you can identify any broken packages and forcefully remove it like this sudo dpkg --remove --force-remove-reinstreq package_name # Finally mopup any other packages with dependacies sudo apt-get -f install