NPM fatal error: 'errno.h' file not found #741

1333 단어

잘못된 프롬프트 발생


Installing assert-plus@^1.0.0  CXX(target) Release/obj.target/node_sleep/sleep.o
In file included from ../sleep.cc:2:
In file included from ../../[email protected]@nan/nan.h:48:
In file included from /Users/haohao/.node-gyp/6.11.5/include/node/uv.h:48:
/Users/haohao/.node-gyp/6.11.5/include/node/uv-errno.h:25:10: fatal error: 'errno.h' file not found
#include 
         ^~~~~~~~~



해결 방법


재설치CommandLineTools 도구
  • rm -rf /Library/Developer/CommandLineTools
  • xcode-select --install
  • xcode-select: note: install requested for command line developer tools
    

    클릭 설치 다운로드 시작Xcode Command Line Tools설치 성공 여부 확인
  • xcode-select -p
  • /Applications/Xcode.app/Contents/Developer
    
  • gcc --version
  • Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
    Apple LLVM version 9.0.0 (clang-900.0.38)
    Target: x86_64-apple-darwin16.7.0
    Thread model: posix
    InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
    

    이렇게 하면 문제를 해결할 수 있을 것이다

    좋은 웹페이지 즐겨찾기