본문 바로가기

Coding/기타

sudo apt install nvidia-cuda-toolkit 설치 오류

nvcc(NVIDIA CUDA Compiler)를 사용하기 위해

 

sudo apt install nvidia-cuda-toolkit 를 설치하던 중 오류가 무지막지하게 발생했다.

 

* 에러 코드

- 처음 sudo apt install nvidia-cuda-toolkit 설치 중

Errors were encountered while processing:  /var/cache/apt/archives/nvidia-cuda-dev_7.5.18-0ubuntu1_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)

 

- 위의 에러를 검색한 후 해결하기 위해(stackoverflow 참고)

sudo apt-get -o Dpkg::Options::="--force-overwrite" install --fix-broken

sudo apt-get --fix-broken install

 

와 같은 방법들을 실행했는데 아래와 같은 에러가 떴다

 

Setting up runit (2.1.2-3ubuntu1) ...
start: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
dpkg: error processing package runit (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of git-daemon-run:
 git-daemon-run depends on runit; however:
  Package runit is not configured yet.

dpkg: error processing package git-daemon-run (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Errors were encountered while processing:
 runit
 git-daemon-run
E: Sub-process /usr/bin/dpkg returned an error code (1)

 

 

 

- 그래서 runit git-daemon-run으로 검색해서 찾은 방법을 시도했더니 해결되었다

이는 sudo apt-get install git-all 과 같이 git을 설치하다가 발생하는 에러를 해결하는 방법이다. 나의 경우에서 nvcc를 설치하는 도중 git을 같이 설치해야 했던 것 같은데, git 설치 중에 문제가 발생한 것 같다.

 

문제의 원인은 runit이 upstart에 의존하는데, Ubuntu 15.04에서 systemd를 사용하기로 변경 되었기 때문이라고 한다. 현재 내가 사용하는 버전은 Ubuntu 16.04이기 때문에 문제가 발생한다고 한다.

 

아래 나오는 명령어를 순서대로로 입력해주면 ubunt 16.04에서 git을 잘 설치할 수 있다.

sudo apt-get purge runit

sudo apt-get purge git-all

sudo apt-get purge git

sudo apt-get autoremove

sudo apt update

sudo apt install git

runit, git-all, git을 지워준 다음에 apt dataset을 비워주고(지워주고) git을 다시 깔면 해결된다.

 

 

 

출처: [Linux] git 설치 오류 대처방안 (git-daemon-run / runit error)