2013-04-06 8 views
1

이 설치하려고 결과입니다 -> extconf 실패 : 필요에 libm의에게설치 libxml은

[email protected] ~ $ sudo gem install libxml-ruby 
Building native extensions. This could take a while... 
ERROR: Error installing libxml-ruby: 
    ERROR: Failed to build gem native extension. 

/opt/rubystack-2.0-0/ruby/bin/ruby extconf.rb 
checking for socket() in -lsocket... no 
checking for gethostbyname() in -lnsl... no 
checking for atan() in -lm... no 
checking for atan() in -lm... no 
*** 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 
    --without-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=/opt/rubystack-2.0-0/ruby/bin/ruby 
    --with-iconv-dir 
    --without-iconv-dir 
    --with-iconv-include 
    --without-iconv-include=${iconv-dir}/include 
    --with-iconv-lib 
    --without-iconv-lib=${iconv-dir}/lib 
    --with-zlib-dir 
    --without-zlib-dir 
    --with-zlib-include 
    --without-zlib-include=${zlib-dir}/include 
    --with-zlib-lib 
    --without-zlib-lib=${zlib-dir}/lib 
    --with-socketlib 
    --without-socketlib 
    --with-nsllib 
    --without-nsllib 
    --with-mlib 
    --without-mlib 
    --with-mlib 
    --without-mlib 
extconf failure: need libm 


Gem files will remain installed in /opt/rubystack-2.0-0/ruby/lib/ruby/gems/1.8/gems/libxml-ruby-2.6.0 for inspection. 
Results logged to /opt/rubystack-2.0-0/ruby/lib/ruby/gems/1.8/gems/libxml-ruby-2.6.0/ext/libxml/gem_make.out 

을 그리고 이것은 mkmf.log의 출력 :


have_library: checking for atan() in -lm... -------------------- no 

"gcc -o conftest -I. -I/opt/rubystack-2.0-0/ruby/lib/ruby/1.8/i686-linux -I. -DAI_ADDRCONFIG=0 -I/opt/rubystack-2.0-0/common/include -D_FILE_OFFSET_BITS=64 -DAI_ADDRCONFIG=0 -I/opt/rubystack-2.0-0/common/include -g -Os -fno-strict-aliasing -L/opt/rubystack-2.0-0/common/lib -fno-builtin conftest.c -L. -L/opt/rubystack-2.0-0/ruby/lib -Wl,-R/opt/rubystack-2.0-0/ruby/lib -L/opt/rubystack-2.0-0/ruby/lib -Wl,-R/opt/rubystack-2.0-0/ruby/lib -L. -L/opt/rubystack-2.0-0/common/lib -ltcmalloc_minimal -rdynamic -Wl,-export-dynamic  -lruby-static -lm -lpthread -lrt -ldl -lcrypt -lm -lc" 
conftest.c: In function ‘t’: 
conftest.c:3: error: ‘atan’ undeclared (first use in this function) 
conftest.c:3: error: (Each undeclared identifier is reported only once 
conftest.c:3: error: for each function it appears in.) 
checked program was: 
/* begin */ 
1: /*top*/ 
2: int main() { return 0; } 
3: int t() { void ((*volatile p)()); p = (void ((*)()))atan; return 0; } 
/* end */ 

"gcc -o conftest -I. -I/opt/rubystack-2.0-0/ruby/lib/ruby/1.8/i686-linux -I. -DAI_ADDRCONFIG=0 -I/opt/rubystack-2.0-0/common/include -D_FILE_OFFSET_BITS=64 -DAI_ADDRCONFIG=0 -I/opt/rubystack-2.0-0/common/include -g -Os -fno-strict-aliasing -L/opt/rubystack-2.0-0/common/lib -fno-builtin conftest.c -L. -L/opt/rubystack-2.0-0/ruby/lib -Wl,-R/opt/rubystack-2.0-0/ruby/lib -L/opt/rubystack-2.0-0/ruby/lib -Wl,-R/opt/rubystack-2.0-0/ruby/lib -L. -L/opt/rubystack-2.0-0/common/lib -ltcmalloc_minimal -rdynamic -Wl,-export-dynamic  -lruby-static -lm -lpthread -lrt -ldl -lcrypt -lm -lc" 
/usr/bin/ld: cannot find -lruby-static 
collect2: ld returned 1 exit status 
checked program was: 
/* begin */ 
1: /*top*/ 
2: int main() { return 0; } 
3: int t() { atan(); return 0; } 
/* end */ 

내가 버추얼 박스에서 http://sourceforge.net/projects/virtualrails/을 사용하고 4.2.8

,536,913,632 일품 1.3.5

그 두 개의 에러를 포함하여 10

:

  • conftest.c : 3 : 오류 'ATAN'미표시 (제 1이 함수에서 사용)

  • 은/usr/빈/LD는 : 하나의 라이브러리가 누락 된 경우 해결이 용이하지만, 두 번째 정말로 확실하지 -lruby 정전기

첫 번째 오류 'ATAN'를 찾거나 더 큰 문제가있는 경우 시작할 수 없습니다 g이 모든

+0

을 구축하기 전에이 모든 것을 가지고 있는지 확인 -get install ruby1.9.1' –

+0

이미 레일이 설치되어있어 루비 1.8.7에서 이미 실행중인 프로젝트가 엉망이된다고 언급하는 것을 잊어 버리시겠습니까? – athospy

답변

0

https://github.com/xml4r/libxml-ruby#requirements :

libxml-ruby requires Ruby 1.8.4 or higher. It is dependent on the following libraries to function properly:
- libm (math routines: very standard)
- libz (zlib)
- libiconv
- libxml2
If you are running Linux or Unix you’ll need a C compiler so the extension can be compiled when it is installed.

난 당신이 쉽다는 sudo`에 의해`1.9.2` 업그레이드하려고하는 것이 좋습니다 당신이 보석

+0

5 시간 동안 libm을 설치하려고 시도했지만 여전히 운이 없다. – athospy

+0

@Santiago Morel Berni,'libm'이 이미 설치되어 있다고 가정하면'/ usr/lib /'폴더에서'libm' 파일을 찾을 수 있습니다 . libxml2가 설치되어 있는지 확인하십시오. – ted

0
sudo apt-get install libxslt-dev libxml2-dev 

sudo gem install libxml-ruby 
+0

이것은 무엇입니까? 이 질문에 어떻게 대답하는지 설명 할 수 있습니까? – Huangism