반응형
gem install mysql 을 실행할 때마다 다음 오류가 표시됩니다.
bash-3.2# gem install mysql
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/opt/local/bin/ruby extconf.rb
checking for mysql_ssl_set()... no
checking for rb_str_set_len()... no
checking for rb_thread_start_timer()... no
checking for mysql.h... no
checking for mysql/mysql.h... 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
--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/local/bin/ruby
--with-mysql-config
--without-mysql-config
Gem files will remain installed in /opt/local/lib/ruby/gems/1.8/gems/mysql-2.8.1 for inspection.
Results logged to /opt/local/lib/ruby/gems/1.8/gems/mysql-2.8.1/ext/mysql_api/gem_make.out
이 문제를 어떻게 해결할 수 있습니까? 패키지 파일 (.pkg)을 사용하여 32 비트 mysql을 설치했으며, 루비를 처음 접했습니다.
업데이트 2011 년 4 월 26 일 오후 5:11 EST
Installed RVM and updated ruby to 1.9.2
Also I have looked through the links posted on the comments. I did locate mysql_config
결과는
/usr/local/mysql-5.1.56-osx10.6-x86/bin/mysql_config
/usr/local/mysql-5.1.56-osx10.6-x86/man/man1/mysql_config.1
따라서 나는 시도했다
gem install mysql - -with-mysql-config=/usr/local/mysql-5.1.56-osx10.6-x86/bin/mysql_config
하지만 여전히 작동하지 않습니다 ... 새로운 오류 정보를 얻었습니다.
/Users/kyle/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:368:in `try_do': The complier failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /Users/kyle/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:435:in `try_link0'
from /Users/kyle/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:440:in `try_link'
from /Users/kyle/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:552:in `try_func'
from /Users/kyle/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:797:in `block in have_func'
from /Users/kyle/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:693:in `block in checking_for'
from /Users/kyle/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:280:in `block (2 levels) in postpone'
from /Users/kyle/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /Users/kyle/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:280:in `block in postpone'
from /Users/kyle/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /Users/kyle/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:276:in `postpone'
from /Users/kyle/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:692:in `checking_for'
from /Users/kyle/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:796:in `have_func'
from extconf.rb:50:in `<main>'
Gem files will remain installed in /Users/kyle/.rvm/rubies/ruby-1.9.2-p180/bin/th-mysql-config=/usr/local/mysql-5.1.56-osx10.6-x86/bin/mysql_config/gems/mysql-2.8.1 for inspection.
댓글을 남겨주신 분들께 진심으로 감사드립니다. 더 많은 도움을 주시면 감사하겠습니다 ...... 2 일 동안 mysql을 설치하려고 노력했습니다 ...
해결 방법
내 시스템에있는 32 비트 MySQL을 제거하고 5.1.56 64 비트를 설치하여 문제를 해결했습니다.
나와 같은 문제를 겪고있는 다른 사람들에게 도움이되기를 바랍니다 ..
참조 페이지 https://stackoverflow.com/questions/5795309
반응형
'MySql' 카테고리의 다른 글
MySQL Python MySQLdb 문제 (TypeError : % d 형식 : str이 아닌 숫자가 필요함) (0) | 2020.10.10 |
---|---|
MySQL SELECT 하위 쿼리의 결과를 사용하여 열 업데이트 (0) | 2020.10.10 |
MySQL 자바의 mysql select 문에서 데이터 검색 (0) | 2020.10.10 |
MySQL 문자열 마지막 색인 (0) | 2020.10.10 |
MySQL 뷰에서 저장 프로 시저를 호출 할 수 있습니까? (0) | 2020.10.10 |
댓글