<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>Ruby on Rails</title><link>http://blog.blueshop.com.tw/guancheng713/category/2414.aspx</link><description>Ruby on Rails</description><managingEditor>Aery</managingEditor><dc:language>zh-TW</dc:language><generator>.Text Version 0.95.2004.101</generator><item><dc:creator>Aery</dc:creator><title>CentOS安裝Ruby MySQL Native Lib時發生的錯誤</title><link>http://blog.blueshop.com.tw/guancheng713/archive/2007/12/24/53823.aspx</link><pubDate>Mon, 24 Dec 2007 21:00:00 GMT</pubDate><guid>http://blog.blueshop.com.tw/guancheng713/archive/2007/12/24/53823.aspx</guid><wfw:comment>http://blog.blueshop.com.tw/guancheng713/comments/53823.aspx</wfw:comment><comments>http://blog.blueshop.com.tw/guancheng713/archive/2007/12/24/53823.aspx#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://blog.blueshop.com.tw/guancheng713/comments/commentRss/53823.aspx</wfw:commentRss><trackback:ping>http://blog.blueshop.com.tw/guancheng713/services/trackbacks/53823.aspx</trackback:ping><description>&lt;P&gt;&lt;FONT size=2&gt;checking for mysql_query() in -lmysqlclient… no&lt;BR&gt;checking for main() in -lm… yes&lt;BR&gt;checking for mysql_query() in -lmysqlclient… no&lt;BR&gt;checking for main() in -lz… yes&lt;BR&gt;checking for mysql_query() in -lmysqlclient… no&lt;BR&gt;checking for main() in -lsocket… no&lt;BR&gt;checking for mysql_query() in -lmysqlclient… no&lt;BR&gt;checking for main() in -lnsl… yes&lt;BR&gt;checking for mysql_query() in -lmysqlclient… no&lt;BR&gt;*** extconf.rb failed ***&lt;BR&gt;Could not create Makefile due to some reason, probably lack of&lt;BR&gt;necessary libraries and/or headers. Check the mkmf.log file for more&lt;BR&gt;details. You may need configuration options.&lt;BR&gt;Provided configuration options:&lt;BR&gt;–with-opt-dir&lt;/FONT&gt;&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;所以得先 remove MySQL 然後再重新安裝 MySQL 跟 MySQL Development Lib&lt;BR&gt;&lt;BR&gt;yum remove mysql&lt;BR&gt;yum install mysql&lt;BR&gt;yum install mysql-devel&lt;BR&gt;&lt;BR&gt;要在 CentOS 安裝 Rails Gem，那就&lt;BR&gt;&lt;BR&gt;gem i rails -y 即可。&lt;BR&gt;&lt;BR&gt;&lt;FONT color=red&gt;gem install mysql -- --with-mysql-include=/usr/include/mysql/mysql --with-mysql-lib=/usr/lib/mysql/&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;參考資料：&lt;A href="http://faq.serverdiy.org/read.php?tid=71"&gt;http://faq.serverdiy.org/read.php?tid=71&lt;/A&gt;&lt;/P&gt;&lt;img src ="http://blog.blueshop.com.tw/guancheng713/aggbug/53823.aspx" width = "1" height = "1" /&gt;</description></item></channel></rss>
