I am an unskilled Ubuntu user and almost each time I try to install something nontrivial I break something miserably. I am successfully using gcc 4.7 and 4.8 simultaneously using update-alternatives according to this answer. Now I would like to try out clang for my C++ development.
I am afraid that the complier is a critical part of the operating system and installing it is nontrivial. I am afraid that if install clang it will overwrite the C++ standard headers and libraries of gcc and/or break something else.
How can I safely install and use clang and gcc?
EDIT:
나는 aptitude가 설치되어 있지 않아서 다음을 시도했습니다.
sudo apt-get install clang-3.4
대신 모든 것이 잘 보입니다. 나는 gcc를 테스트 했고 그것을 깨지 않은 것 같습니다.
그런 다음 clang으로 무언가를 컴파일하려고 시도했는데 다음 오류가 발생했습니다.
/usr/include/c++/4.8/iostream:38: error: 'bits/c++config.h' file not found
#include <bits/c++config.h>
^
clang 이 gcc 표준 라이브러리 를 사용하려는 것 같습니다 . 어떻게 해결할 수 있습니까?
모든 것을 직접 컴파일 할 가능성이 있습니다. 만약 당신이 '숙련되지 않은'우분투 사용자라면 (나는 그렇게 생각하지 않는다. 단지 새로운) 우분투 사용자라면 deb
관리자가 당신을 위해 열심히 일할 것을 적극 제안 할 것이다.
따라서 apt-get에 사용하려는 사본이 있는지 확인하십시오.
aptitude search clang
그것이 훌륭하다면 그것은 일을 처리 할 것입니다. 그렇지 않다면 여기에서 tar ball을 다운로드 할 수 있습니다.
Extact it to /usr/local
or /opt
from there you can use it and delete the entire folder if you wish without any affects on your system.
Goodluck.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다