BBahmni 한국어 매뉴얼검색
한국어 번역 완료
한국어English

개발 도구 설치 문제 해결

MacOS

Gem 디렉터리 쓰기 권한 없음

문제

해결 방법

Ruby 개발 도구 누락

문제

gem 컴파일에 필요한 종속성이 누락되었습니다.

$ sudo gem install compass
Building native extensions.  This could take a while...
ERROR:  Error installing compass:
    ERROR: Failed to build gem native extension.

    current directory: /usr/local/lib/ruby/gems/2.4.0/gems/ffi-1.9.18/ext/ffi_c
/usr/local/opt/ruby/bin/ruby -r ./siteconf20170407-4681-fc3mfa.rb extconf.rb
checking for ffi.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
    --with-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/usr/local/Cellar/ruby/2.4.1_1/bin/$(RUBY_BASE_NAME)
    --with-ffi_c-dir
    --without-ffi_c-dir
    --with-ffi_c-include
    --without-ffi_c-include=${ffi_c-dir}/include
    --with-ffi_c-lib
    --without-ffi_c-lib=${ffi_c-dir}/lib
    --with-libffi-config
    --without-libffi-config
    --with-pkg-config
    --without-pkg-config
/usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/mkmf.rb:457:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/mkmf.rb:588:in `try_cpp'
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/mkmf.rb:1095:in `block in have_header'
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/mkmf.rb:945:in `block in checking_for'
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/mkmf.rb:351:in `block (2 levels) in postpone'
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/mkmf.rb:321:in `open'
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/mkmf.rb:351:in `block in postpone'
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/mkmf.rb:321:in `open'
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/mkmf.rb:347:in `postpone'
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/mkmf.rb:944:in `checking_for'
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/mkmf.rb:1094:in `have_header'
    from extconf.rb:16:in `<main>'

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /usr/local/lib/ruby/gems/2.4.0/extensions/x86_64-darwin-16/2.4.0/ffi-1.9.18/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /usr/local/lib/ruby/gems/2.4.0/gems/ffi-1.9.18 for inspection.
Results logged to /usr/local/lib/ruby/gems/2.4.0/extensions/x86_64-darwin-16/2.4.0/ffi-1.9.18/gem_make.out

해결 방법

이 명령을 입력한 뒤 설정 마법사의 안내를 따릅니다. 그런 다음 compass 설치를 다시 시도합니다.

https://github.com/CocoaPods/CocoaPods/issues/1727#issuecomment-31496173 참고

원문 정보

Bahmni Wiki · CC BY-SA 4.0

원문 보기 ↗