- M2 macbook 사용중 발생한 에러
Installing vroom 1.7.1 ... FAILED
Error: Error installing package 'vroom':
=================================
- installing source package ‘vroom’ ...
** package ‘vroom’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
using C compiler: ‘Apple clang version 21.0.0 (clang-2100.1.1.101)’
using C++ compiler: ‘Apple clang version 21.0.0 (clang-2100.1.1.101)’
using SDK: ‘MacOSX26.5.sdk’
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/include" -DNDEBUG -Imio/include -DWIN32_LEAN_AND_MEAN -Ispdlog/include -DFMT_HEADER_ONLY -I'/Users/goongdeee/Documents/GitHub/clonecensorweighting_fork/renv/staging/1/cpp11/include' -I'/Users/goongdeee/Documents/GitHub/clonecensorweighting_fork/renv/staging/1/progress/include' -I'/Users/goongdeee/Documents/GitHub/clonecensorweighting_fork/renv/staging/1/tzdb/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c Iconv.cpp -o Iconv.o
In file included from Iconv.cpp:1:
In file included from ./Iconv.h:4:
In file included from /Users/goongdeee/Documents/GitHub/clonecensorweighting_fork/renv/staging/1/cpp11/include/cpp11/R.hpp:20:
/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/include/Rinternals.h:34:11: fatal error: 'cstdio' file not found
34 | # include
| ^~~~~~~~
1 error generated.
make: *** [Iconv.o] Error 1
ERROR: compilation failed for package ‘vroom’
- removing ‘/Users/goongdeee/Documents/GitHub/clonecensorweighting_fork/renv/staging/1/vroom’
install of package 'vroom' failed [error code 1]
Traceback (most recent calls last):
13: renv::restore()
12: renv_restore_run_actions(project, diff, current, lockfile, rebuild)
11: renv_install_impl(records)
10: renv_install_staged(records)
9: renv_install_default(records)
8: handler(package, renv_install_package(record))
7: renv_install_package(record)
6: withCallingHandlers(renv_install_package_impl(record), error = function(e) writef("FAILED"))
5: renv_install_package_impl(record)
4: r_cmd_install(package, path)
3: r_exec_error(package, output, "install", status)
2: abort(all)
1: stop(fallback)
- 이 현상은 주로 macOS 업데이트나 Xcode 업데이트 이후 Command Line Tools의 경로가 꼬였거나 파일이 손상되었을 때 일어나는 것으로 확인
- 아래를 실행하여 해결
1. 기존 개발 도구 디렉토리 강제 삭제
sudo rm -rf /Library/Developer/CommandLineTools
2. 개발 도구 재설치 (팝업창이 뜨면 '설치' 클릭 후 완료될 때까지 대기)
xcode-select --install
Installing vroom 1.7.1 ... FAILED
Error: Error installing package 'vroom':
=================================
** package ‘vroom’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
using C compiler: ‘Apple clang version 21.0.0 (clang-2100.1.1.101)’
using C++ compiler: ‘Apple clang version 21.0.0 (clang-2100.1.1.101)’
using SDK: ‘MacOSX26.5.sdk’
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/include" -DNDEBUG -Imio/include -DWIN32_LEAN_AND_MEAN -Ispdlog/include -DFMT_HEADER_ONLY -I'/Users/goongdeee/Documents/GitHub/clonecensorweighting_fork/renv/staging/1/cpp11/include' -I'/Users/goongdeee/Documents/GitHub/clonecensorweighting_fork/renv/staging/1/progress/include' -I'/Users/goongdeee/Documents/GitHub/clonecensorweighting_fork/renv/staging/1/tzdb/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c Iconv.cpp -o Iconv.o
In file included from Iconv.cpp:1:
In file included from ./Iconv.h:4:
In file included from /Users/goongdeee/Documents/GitHub/clonecensorweighting_fork/renv/staging/1/cpp11/include/cpp11/R.hpp:20:
/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/include/Rinternals.h:34:11: fatal error: 'cstdio' file not found
34 | # include
| ^~~~~~~~
1 error generated.
make: *** [Iconv.o] Error 1
ERROR: compilation failed for package ‘vroom’
install of package 'vroom' failed [error code 1]
Traceback (most recent calls last):
13: renv::restore()
12: renv_restore_run_actions(project, diff, current, lockfile, rebuild)
11: renv_install_impl(records)
10: renv_install_staged(records)
9: renv_install_default(records)
8: handler(package, renv_install_package(record))
7: renv_install_package(record)
6: withCallingHandlers(renv_install_package_impl(record), error = function(e) writef("FAILED"))
5: renv_install_package_impl(record)
4: r_cmd_install(package, path)
3: r_exec_error(package, output, "install", status)
2: abort(all)
1: stop(fallback)
1. 기존 개발 도구 디렉토리 강제 삭제
sudo rm -rf /Library/Developer/CommandLineTools
2. 개발 도구 재설치 (팝업창이 뜨면 '설치' 클릭 후 완료될 때까지 대기)
xcode-select --install