"gem install mysql" failed. This might be another stupid question, but really block me for couple of days. I tried gem: gem install mysql -- --with-mysql-config=/usr/bin/mysql_config and got: ERROR: Error installing mysql: ERROR: Failed to build gem native extension. /usr/local/bin/ruby extconf.rb --with-mysql-config=/usr/bin/mysql_config extconf.rb:1: command not found: /usr/bin/mysql_config --cflags *** extconf.rb failed *** This might be something wrong with mysql becouse 'mysql_config' can not be located. [root@localhost ~]# whereis mysql_config mysql_config: I also tried mysql-ruby: [root@localhost mysql-ruby-2.8.1]# ruby extconf.rb --with-mysql-dir=/usr/bin/mysql checking for mysql_query() in -lmysqlclient... no checking for main() in -lm... no checking for mysql_query() in -lmysqlclient... no checking for main() in -lz... no checking for mysql_query() in -lmysqlclient... no checking for main() in -lsocket... no checking for mysql_query() in -lmysqlclient... no checking for main() in -lnsl... no checking for mysql_query() in -lmysqlclient... no checking for main() in -lmygcc... no checking for mysql_query() in -lmysqlclient... no *** extconf.rb failed *** here is the env info: Linux version 2.6.18-128.4.1.el5PAE (mockbuild@builder16.centos.org) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-44)) #1 SMP Tue Aug 4 20:58:34 EDT 2009 [root@localhost ~]# whereis mysql mysql: /usr/bin/mysql /usr/local/lib/mysql /usr/share/mysql /usr/share/man/man1/mysql.1.gz [root@localhost ~]# ruby -v ruby 1.8.6 (2008-03-03 patchlevel 114) [i686-linux] [root@localhost ~]# rails -v Rails 2.3.3 [root@localhost ~]# gem -v 1.3.5 any suggestion will be appreciate :)
on 2009-08-13 12:48
on 2009-08-13 12:55
Jason Wei wrote: > This might be something wrong with mysql becouse 'mysql_config' can not > be located. > [root@localhost ~]# whereis mysql_config > mysql_config: Indeed, you are missing the MySQL client and (probably) development files. You should install them using your package manager and try again. -- Roderick van Domburg http://en.railscluster.nl
on 2009-08-13 13:08
Roderick van Domburg wrote: > Jason Wei wrote: >> This might be something wrong with mysql becouse 'mysql_config' can not >> be located. >> [root@localhost ~]# whereis mysql_config >> mysql_config: > > Indeed, you are missing the MySQL client and (probably) development > files. You should install them using your package manager and try again. > > -- > Roderick van Domburg > http://en.railscluster.nl thx Roderick. could u give me hint. what exactly package I should install. [root@localhost ~]# rpm -qa|grep -i mysql MySQL-client-5.1.37-0.glibc23 MySQL-server-5.1.37-0.glibc23
on 2009-08-13 17:54
Jason Wei wrote: > Roderick van Domburg wrote: >> Jason Wei wrote: >>> This might be something wrong with mysql becouse 'mysql_config' can not >>> be located. >>> [root@localhost ~]# whereis mysql_config >>> mysql_config: >> >> Indeed, you are missing the MySQL client and (probably) development >> files. You should install them using your package manager and try again. >> >> -- >> Roderick van Domburg >> http://en.railscluster.nl > > thx Roderick. > could u give me hint. what exactly package I should install. > > [root@localhost ~]# rpm -qa|grep -i mysql > MySQL-client-5.1.37-0.glibc23 > MySQL-server-5.1.37-0.glibc23 I reinstall the related rpm. these are needed. perl-DBD-MySQL-3.0007-2.el5 mysql-5.0.45-7.el5 mysql-server-5.0.45-7.el5 mysql-devel-5.0.45-7.el5