Gem native 확장을 빌드하지 못했습니다(Compass 설치).
최신 버전의 나침반(https://rubygems.org/gems/compass/versions/1.0.0.alpha.17), 을 설치하려고 하면 다음과 같은 오류가 발생합니다.
ERROR: Error installing compass:
ERROR: Failed to build gem native extension.
ERROR: Error installing compass:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for ffi.h... no
checking for ffi.h in /usr/local/include,/usr/include/ffi... yes
checking for ffi_call() in -lffi... yes
checking for ffi_prep_closure()... yes
checking for ffi_raw_call()... no
checking for rb_thread_blocking_region()... yes
checking for rb_thread_call_with_gvl()... yes
checking for rb_thread_call_without_gvl()... yes
checking for ffi_prep_cif_var()... no
creating extconf.h
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling AbstractMemory.c
compiling ArrayType.c
compiling Buffer.c
compiling Call.c
Call.c:303:5: warning: implicit declaration of function 'rb_thread_call_without_gvl' is invalid in C99 [-Wimplicit-function-declaration]
rbffi_thread_blocking_region(call_blocking_function, data, (void *) -1, NULL);
^
./Thread.h:78:39: note: expanded from macro 'rbffi_thread_blocking_region'
# define rbffi_thread_blocking_region rb_thread_call_without_gvl
^
1 warning generated.
compiling ClosurePool.c
compiling DataConverter.c
DataConverter.c:43:1: warning: control may reach end of non-void function [-Wreturn-type]
}
^
1 warning generated.
compiling DynamicLibrary.c
compiling ffi.c
compiling Function.c
Function.c:479:33: warning: incompatible pointer types passing 'VALUE (void *)' to parameter of type 'void *(*)(void *)' [-Wincompatible-pointer-types]
rb_thread_call_with_gvl(callback_with_gvl, &cb);
^~~~~~~~~~~~~~~~~
Function.c:102:46: note: passing argument to parameter 'func' here
extern void *rb_thread_call_with_gvl(void *(*func)(void *), void *data1);
^
Function.c:563:9: warning: implicit declaration of function 'rb_thread_call_without_gvl' is invalid in C99 [-Wimplicit-function-declaration]
rb_thread_call_without_gvl(async_cb_wait, &w, async_cb_stop, &w);
^
Function.c:738:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
3 warnings generated.
compiling FunctionInfo.c
compiling LastError.c
compiling LongDouble.c
compiling MappedType.c
compiling MemoryPointer.c
compiling MethodHandle.c
compiling Platform.c
compiling Pointer.c
compiling Struct.c
compiling StructByReference.c
compiling StructByValue.c
compiling StructLayout.c
compiling Thread.c
compiling Type.c
compiling Types.c
compiling Variadic.c
linking shared-object ffi_c.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [ffi_c.bundle] Error 1
make failed, exit code 2
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/ffi-1.9.3 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-13/2.0.0/ffi-1.9.3/gem_make.out
이게 무슨 일입니까?최신 나침반을 오류 없이 설치하려면 어떻게 해야 합니까?
이것을 시도한 다음 나침반을 다시 설치해 보십시오.
apt-get install ruby-dev
Mac OS X 10.10(Yosemite)에 나침반을 설치하려면 다음을 수행해야 했습니다.
Ruby 환경 설정
- Ruby가 설치되어 있고 최신 상태인지 확인합니다.
ruby -v
- 보업트이
sudo gem update --system
MAC 환경 설정
Xcode 명령줄 도구를 설치합니다. 이것이 나침반을 설치하는 열쇠입니다.
xcode-select --install
Xcode 명령줄 도구를 설치하는 것이 나침반이 OS X에서 작동하도록 하는 열쇠입니다.
나침반 설치
sudo gem install compass
은 가장좋방은입니다.sudo apt-get install ruby-compass
나침반을 설치합니다.
데비안에서 시도해 볼 수 있습니다.
sudo apt-get install gcc ruby-dev rubygems compass
페도라, 센토스용
yum -y install gcc ruby-devel rubygems compass
그것은 나에게 효과가 있었다.
저는 당신과 같은 문제로 약 3시간 동안 씨름했습니다. 기준Compass 1.0.alpha19
요구 사항은 rvm 버전 1.9.3에 대한 것입니다.
몇 개의 미수집 게시물이 있지만, 저에게 효과가 있었던 것은 다음과 같습니다.
sudo gem uninstall sass
sudo gem uninstall compass
rvm install ruby-1.9.3-p448
sudo gem install sass --pre
sudo gem install compass --pre
그리고 그것으로 끝입니다.당신에게도 효과가 있기를 바랍니다!
이 를 해결하기 버전이 .gem update --system
그런 다음 Xcode와 명령줄 도구가 설치되어 있는지 확인해야 했습니다.xcode-select --install
.
Mac OS에서 이 기능을 설치해야 합니다!
xcode-select --install
Ubuntu를 사용하는 경우 build-essential을 설치해야 합니다.
apt install build-essential
Ubuntu를 새로 설치할 때 gems를 설치하는 데 문제가 있었는데 이 솔루션이 저에게 효과가 있었습니다.
안녕하세요. Mac에서 작동하는 것은 어려운 일이었기 때문에 어쨌든 여기에 해결책이 있습니다.
- macports
- rvm 설치
- 터미널 다시 시작
- 려달을 합니다.
rvm requirements
그 다음에 달려라rvm install 2.1
- 그리고 실행하기 위한 마지막 단계
gem install compass --pre
확실하진 않지만, 매버릭스의 루비 버전은 네이티브 확장 등을 지원하지 않습니다.그래서 제가 "2.1"했던 것처럼 다른 루비 버전을 가리키면 잘 작동합니다.
이 중 정답으로 표시된 것이 없는 이유는 모르겠지만, 구글 검색을 통해 여기에 도착했으니 제가 아는 것을 전달하겠습니다.
@paul_g의 방법은 Macosx10.9 Retina에 대한 단계와 매우 가까웠습니다.
- macports
- addrvm으로 )
--insecure
문제에 $SSL 관문플) $\curl -sSL --insecure https://get.rvm.io | bash -s stable --ruby
- 터미널 다시 시작 / 프로필 리소스
- 려달을 합니다.
rvm requirements --with-gcc=clang
- 그리고 실행하기 위한 마지막 단계
gem install compass --pre
sudo gem update --system
sudo gem install compass
Mac OS의 경우:
새 XCode를 설치한 후 [XCode] - [환경설정] - [위치] - [명령줄 도구]에서 옵션을 선택하는 것을 잊어버린 것이 실수였습니다(2개의 버전이 있었는데 나중에 하나를 삭제했습니다).아마도 누군가에게 도움이 될 것입니다.
기본적으로 시스템에 설치되지 않은 Apple의 명령줄 도구를 설치해야 할 수 있습니다.같은 오류가 발생했지만 여기에 나와 있는 지침을 따르기 전에 (관련 없는 문제로 인해) 명령줄 도구를 설치했고 다시 시도했을 때 나침반이 문제 없이 설치된 것을 확인했습니다.YMMV.
나침반을 요세미티에 설치하려면 Ruby 환경을 설정하고 Xcode 명령줄 도구를 설치해야 합니다.그러나 가장 중요한 것은 Xcode를 업데이트한 후 Xcode 애플리케이션을 실행하고 Apple 라이센스 조항에 동의해야 한다는 것입니다.그러면 구성 요소 설치가 완료됩니다.그런 다음 나침반을 설치할 수 있습니다: sudogem 설치 나침반
Mojave의 경우 macOS 10.14 Mojave를 통해 합니다.xcode-select --install
다음 명령을 실행하여 std 헤더를 설치합니다.
sudo open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
이제 명령을 다시 시도하십시오.
당신은 gcc,json_pure를 가지고 있어야 합니다.
저는 여러 게시물에서 정보를 수집합니다.
sudo gem uninstall sass
sudo gem uninstall compass
sudo gem update --system
gem install json_pure (if you have already have continued to next step)
sudo yum install gcc gcc-c++ (if you have already have continued to next step)
sudo gem install sass
sudo gem install compass
안녕 만약 ** sudogem update -- 시스템 **이 작동하지 않는다면 업데이트에서 오류가 발생한 다음 사용합니다.
sudogem 업데이트 --시스템 2.7.8
yosemite에서는 명령줄 도구를 설치하기만 하면 됩니다.그러면 작동합니다.
다른 보석들이 잘 설치되었더라도.gem 설치 나침반이 작동하려면 xcode-select --install을 실행해야 합니다.
행운을 빌어요.
X 10 OS X 10.9를 사용해 xcode-select --install
과 같은오류가 할 것입니다.
현재 소프트웨어 업데이트 서버에서 소프트웨어를 사용할 수 없기 때문에 소프트웨어를 설치할 수 없습니다.
이 솔루션은 Apple 웹 사이트 https://developer.apple.com/downloads/index.action?name=for%20Xcode%20- 에서 직접 명령줄 도구(OS X 10.9)를 다운로드하는 것입니다.
그런 다음 명령줄 도구의 마지막 버전을 설치할 수 있습니다.
Ubuntu 14.04에서 apt-get install 루비젬을 실행하는 동안 오류가 발생했습니다.
E: 패키지 'rubygems'에 설치 후보가 없습니다.
follow 명령어로 문제를 해결합니다.
sudo apt-get install gcc ruby-devel rubygems-integration ruby-compass
해라brew install coreutils
.
저는 최근 동료가 루비 2.2.5로 업데이트한 노후화된 sass/compass 프로젝트를 재구축하면서 이 문제에 부딪혔습니다.이 프로젝트는 rvm과 bundler를 사용합니다.이것들이 나의 명령이었습니다.
$ rvm install ruby-2.2.5
$ rvm use ruby-2.2.5
$ gem install bundler
$ bundle install
이것은 내가 유명한 사람을 때리게 만들었습니다.ffi
StackOverflow 환경에서 보고되는 설치 오류:
An error occurred while installing ffi (1.9.14), and Bundler cannot continue.
이 문제를 해결하기 위한 대부분의 제안은 Xcode 명령줄 도구를 설치하는 것입니다.그러나 이는 이미 환경에 설치되어 있습니다.
$ xcode-select -p
/Library/Developer/CommandLineTools
gcc를 설치하라는 다른 제안이 있습니다...그래서 노력했어요:
$ brew install gcc46
하지만 이것도 분할 결함으로 인해 실패했습니다... ¯\_(ツ)_/¯
.
그래서, 저는 손으로 나침반을 설치해 보았습니다. 그것이 같은 것을 줄 수 있는지 보기 위해서요.ffi
오류:
$ gem install compass
하지만 놀랍게도, 저는 완전히 다른 오류를 얻었습니다.
make: /usr/local/bin/gmkdir: No such file or directory
그래서 저는 그 이슈를 검색했고, coreutils를 설치하라는 고대의 블로그 게시물을 찾았습니다.
$ brew install coreutils
설치 후coreutils
홈브루를 사용하여 번들러는 나침반과 종속성을 성공적으로 완료하고 설치할 수 있었습니다.
끝.
언제
gem 설치 오버 커밋
또한 이 오류가 터미널에 배치되었습니다.
Failed to build gem native extension
똑같이 해주세요
xcode-select --install
그리고 그것은 그 문제도 해결할 것입니다.
이것을 시도한 다음 나침반을 다시 설치해 보십시오.
sudo apt install ruby-full
리눅스 민트에서도 같은 문제가 있었지만 루비를 제거하고 다시 설치하여 수정할 수 있었습니다.
루비 제거:
sudo apt-get remove ruby
다음과 같은 루비 패키지를 보고했습니다.
Package 'ruby' is not installed, so not removed
The following packages were automatically installed and are no longer required:
libruby2.2 ruby-chunky-png ruby-sass rubygems-integration
Use 'apt-get autoremove' to remove them.
남은 패키지 제거*
apt-get autoremove
루비 다시 설치
sudo apt-get install ruby2.2
나침반 설치
sudo gem install compass
마지막 명령이 성공적으로 실행되었습니다.
처음에는 Ruby 2.6에서 3.0으로 업그레이드해야 했습니다(https://rvm.io/) 참조).
$ curl -sSL https://get.rvm.io | bash -s stable --ruby
$ source /Usrs/myuser/.rvm/scripts/rvm
그런 다음 Mac OSX 권한이 없으면 업그레이드할 수 없기 때문에 로컬로 설치해야 했습니다(오류: 보석을 실행하는 동안... (Errno::EPERM) 작업이 허용되지 않음):
$ sudo gem install -n /usr/local/bin compass
설치 여부를 완전히 확신할 수 없습니다.rvm
위의 첫 번째는 필요했지만, 루비를 업그레이드하는 데 유용했습니다.
Mac에 Ruby gem을 설치하는 것은 일반적인 혼란과 좌절의 원인입니다.안타깝게도 대부분의 솔루션은 불완전하고 구식이며 나쁜 조언을 제공합니다.가장 많은 표를 얻은 답은 다음과 같습니다.sudo
특히 당신이 그것이 무엇을 하는지 이해하지 못한다면, 당신은 절대 할 필요가 없습니다.
보석을 설치할 때 sudo를 사용해서는 안 되는 이유를 알아보십시오.
Apple 명령줄 도구가 설치되지 않았기 때문에 "Gem native extension을 빌드하지 못했습니다." 오류가 발생한 것은 정확합니다.그러나 설치한다고 해서 반드시 적절한 Ruby 환경이 제공되는 것은 아닙니다.
높은 수준에서, 작동하는 루비 설정에는 5단계가 있으며, Mac에 루비 보석을 설치하는 최종 가이드에 자세히 설명했습니다.이 오류가 발생하는 이유를 설명하고, 다양한 솔루션을 비교하며, 일부 솔루션이 다른 솔루션보다 우수한 이유와 사용하면 안 되는 이유를 설명합니다.sudo
.
저는 이 답변에 이러한 단계에 대해서도 썼습니다. https://stackoverflow.com/a/54873916/928191
언급URL : https://stackoverflow.com/questions/22544754/failed-to-build-gem-native-extension-installing-compass
'sourcecode' 카테고리의 다른 글
안드로이드에서 프로그램적으로 dp에서 마진을 설정하려면 어떻게 해야 합니까? (0) | 2023.06.02 |
---|---|
오토매퍼:새 개체를 만들지 않고 속성 값 업데이트 (0) | 2023.06.02 |
div 내에서 텍스트 수직 정렬 (0) | 2023.06.02 |
iOS에서 두 날짜 사이의 시간(시간)을 계산하는 방법 (0) | 2023.06.02 |
목표 C 문자열에서 정수 구문 분석 (0) | 2023.06.02 |