-
카테고리
-
세부 분야
알고리즘 · 자료구조
-
해결 여부
미해결
no such file or directory: /usr/local/include
22.06.26 00:31 작성 조회수 787
0
cd /usr/local/include
mkdir bits
cd bits
vi stdc++.h
m1 맥북에어 사용중인데 brew install gcc 설치 교안대로 include 폴더에서 bits폴더를 만드려고하니
아래와같이 에러가 나는데 혹시 해결방법이 무엇인지 궁금합니다;
no such file or directory: /usr/local/include
제 경우 gcc -v로 확인시 아래와같습니다
(/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/
경로 안에서 교안 내용 적용하고
g++ -std=c++14 -Wall a.cpp -o test.out
./test.out 하면 정상적으로 출력되긴합니다;)
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/4.2.1
Apple clang version 13.0.0 (clang-1300.0.27.3)
Target: arm64-apple-darwin21.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
답변을 작성해보세요.
1
큰돌
지식공유자2022.06.26
안녕하세요. ㅎㅎ
아마 m1 맥북은 경로명을 다르게 해줘야 하는 것같은데요.
cd /Library/Developer/CommandLineTools/usr/include
혹시 여기로 들어가서 해보시겠어요? 들어가서 bits폴더 만들고 등등이요.
감사합니다.
강사 큰돌 올림.
답변 2