English 中文(简体)
Error在试图安装海螺球时
原标题:Error when trying to install mysql gem on os x

我正试图在我的Gemfile上增加我的舱面,并在安装dle时安装。 我有以下错误。

Installing mysql (2.8.1) with native extensions /Library/Ruby/Site/1.8/rubygems/installer.rb:483:in `build_extensions : ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb 
mkmf.rb can t find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h

我也试图在高原之前跑。 任何关于如何解决问题的想法都是巨大的。

thanks, Matthew

问题回答

正如塔德曼提到,你需要安装开发工具,以便工作。 但是,错误信息告诉我们,你丢失了一些我的酋长档案。 我不知道你是否使用64比特(mac i假设?)系统,第32段。 在64个轨道上,你可以这样做:

Download mysql. http://dev.mysql.com/get/Downloads/MySQL-5.1/mysql-5.1.51-osx10.6-x86_64.dmg/from/http://mirror.leaseweb.com/mysql/

然后用正确的约束装置 g。 我从来不曾与考试和测验科一起尝试过,因此,你们应该!

sudo env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

是否安装了SOS X开发器工具? 如果你再次找不到XCode,你可能没有关键组成部分,例如Ruby和MySQL的头号档案。

如果你重新使用默认系统,那么使用RVM来管理安装。 我个人喜欢MacPorts,因为这也有助于安装可能需要的各种系统图书馆。

这里有example ,说明如何使用Maports。 它以前称为达尔文港,但这一原则也是一样的。





相关问题
SQL SubQuery getting particular column

I noticed that there were some threads with similar questions, and I did look through them but did not really get a convincing answer. Here s my question: The subquery below returns a Table with 3 ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

php return a specific row from query

Is it possible in php to return a specific row of data from a mysql query? None of the fetch statements that I ve found return a 2 dimensional array to access specific rows. I want to be able to ...

Character Encodings in PHP and MySQL

Our website was developed with a meta tag set to... <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> This works fine for M-dashes and special quotes, etc. However, I ...

Pagination Strategies for Complex (slow) Datasets

What are some of the strategies being used for pagination of data sets that involve complex queries? count(*) takes ~1.5 sec so we don t want to hit the DB for every page view. Currently there are ~...

Averaging a total in mySQL

My table looks like person_id | car_id | miles ------------------------------ 1 | 1 | 100 1 | 2 | 200 2 | 3 | 1000 2 | 4 | 500 I need to ...

热门标签