在OSX Mavericks上安装Ruby on Rails时libxml2出现问题 [英] Problems with libxml2 when installing Ruby on Rails on OSX Mavericks

查看:62
本文介绍了在OSX Mavericks上安装Ruby on Rails时libxml2出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在终端中安装Ruby on Rails时遇到问题.

I'm having a problem installing Ruby on Rails in my terminal.

其他人在终端中遇到以下错误:

Has anyone else encountered the following error in the terminal:

checking for main() in -llzma... yes
checking for xmlParseDoc() in libxml/parser.h... no
checking for xmlParseDoc() in -lxml2... no
checking for xmlParseDoc() in -llibxml2... no
-----
libxml2 is missing.  Please locate mkmf.log to investigate how it is failing.
-----
*** 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.

我正在使用标准bash:

I'm using the standard bash:

$ gem install rails

我将如何解决此问题?我已经在堆栈交换上尝试了一些方法,但是到目前为止没有任何效果……

How would I go about fixing this? I've tried a few things here on stack exchange but nothing so far has worked...

在终端中使用 $酿造清单会产生:

Michaels-iMac:~ iMacHome$ brew list
autoconf    libksba     libxslt     pkg-config
automake    libtool     libyaml     readline
libgpg-error    libxml2     openssl
Michaels-iMac:~ iMacHome$

似乎在那里...

推荐答案

假设您已安装Xcode,请尝试

assuming you have Xcode installed try this

gem install rails -- --with-xml2-include=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.‌platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/libxml2 --use-system-libraries

这篇关于在OSX Mavericks上安装Ruby on Rails时libxml2出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆