카테고리

asm (27) bootloader_x86_grub (1) C (92) compile (11) config (76) CPP (13) CSS (1) debugging (7) gimp (1) Go (1) html (1) Java (1) JavaScript (1) kernel (19) LibreOffice (3) Linux system progamming (21) MFC (1) opencv (4) OpenGL (1) PHP (1) Python (4) qemu (29) shell (3) socket (7) troubleshooting (2) ubuntu18.04 (2) windows (1)

2019/11/27

Nvidia 드라이버 및 CUDA 삭제

Ndivia driver
sudo apt-get remove --purge '^nvidia-.*'

CUDA
sudo apt-get --purge remove 'cuda*'
sudo apt-get autoremove --purge 'cuda*'

CUDA 파일 삭제
sudo rm -rf /usr/local/cuda
or
sudo rm -rf /usr/local/cuda-10.0

ubuntu 18.04 gcc 버전별 설치

GCC (GNU Compiler Collection)는 C, C ++, Objective-C, Fortran, Ada, Go 및 D 프로그래밍 언어를 위한 컴파일러 및 라이브러리의 모음이댜.

GNU 도구 및 Linux 커널을 포함한 많은 오픈 소스 프로젝트는 GCC로 컴파일된다.

Ubuntu 18.04에 GCC 컴파일러를 설치하는 데 필요한 단계를 보여준다.
배포판 안정 버전과 최신 버전의 GCC를 설치하는 방법들이다.

저장소 업데이트
sudo apt update
sudo apt install build-essential

맨페이지 설치.
sudo apt-get install manpages-dev

버전 확인.
gcc --version

다수의 GCC 버전 설치

저장소 등록
sudo apt install software-properties-common
sudo add-apt-repository ppa:ubuntu-toolchain-r/test

gcc 설치
sudo apt install gcc-7 g++-7 gcc-8 g++-8 gcc-9 g++-9

각 버전에 대한 우선순위 지정.
기본으로 설정하면 우선 순위가 가장 높다.

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90 --slave /usr/bin/g++ g++ /usr/bin/g++-9 --slave /usr/bin/gcov gcov /usr/bin/gcov-9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 80 --slave /usr/bin/g++ g++ /usr/bin/g++-8 --slave /usr/bin/gcov gcov /usr/bin/gcov-8
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 70 --slave /usr/bin/g++ g++ /usr/bin/g++-7 --slave /usr/bin/gcov gcov /usr/bin/gcov-7

본 버전을 변경
sudo update-alternatives --config gcc

There are 3 choices for the alternative gcc (providing /usr/bin/gcc).

  Selection    Path            Priority   Status
------------------------------------------------------------
* 0            /usr/bin/gcc-9   90        auto mode
  1            /usr/bin/gcc-7   70        manual mode
  2            /usr/bin/gcc-8   80        manual mode
  3            /usr/bin/gcc-9   90        manual mode

Press <enter> to keep the current choice[*], or type selection number: