Olá pessoal, como andam?
Recentemente fui instalar em um servidor o redmine, ferramenta opensource para controle e acompanhamento de projetos.
Um dos grandes problemas que encontrei no meio do caminho foi a instalação passo a passo do Ruby no CentOS. Seguindo os passos do RedmineInstall, emperrei na instalação do mysql no gem.
Quando eu tento instalar eu recebo a seguinte mensagem de erro:
[root@localhost purab]# sudo gem install mysql
Building native extensions. This could take a while…
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb
checking for mysql_ssl_set()… yes
checking for rb_str_set_len()… no
checking for rb_thread_start_timer()… yes
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
–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=/usr/bin/ruby
–with-mysql-config
–without-mysql-config
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/mysql-2.8.1 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/mysql-2.8.1/ext/mysql_api/gem_make.out
O estranho é que eu instalei o mysql utilizando o "yum install mysql mysql-server" como você pode ver abaixo:
[root@localhost purab]# whereis mysql_config
mysql_config: /usr/bin/mysql_config
Então, depois de googlear bastante, eu achei uma possível solução, tentar instalar o mysql-devel "yum install mysql-devel".
[root@localhost purab]# yum install mysql-devel
Installed:
mysql-devel.i586 0:5.1.37-1.fc11
Complete!
Agora, quando fui tentar novamente instalar o mysql no meu gem, consegui perfeitamente:
[root@localhost purab]# gem install mysql
Building native extensions. This could take a while…
Successfully installed mysql-2.8.1
1 gem installed
Installing ri documentation for mysql-2.8.1…
Installing RDoc documentation for mysql-2.8.1…
[root@localhost purab]#
Então, quando vocês forem instalar o mysql no seu gem do ruby, não esqueça de instalar também o pacote "mysql-devel" utilizando o "yum" no Centos.
Bom, é isto galera e até a próxima.
![]() |
CodigoFonte.net » Meu Mural » Competiva - Criação de Sites » Todos os Direitos Reservados © 2002/2010 |