【发布时间】:2015-02-27 13:42:34
【问题描述】:
我在终端中安装 Ruby on Rails 时遇到问题。
有没有其他人在终端遇到如下错误:
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:
$ gem install rails
我将如何解决这个问题?我在堆栈交换上尝试了一些东西,但到目前为止没有任何效果......
在终端中使用$ brew list 会产生:
Michaels-iMac:~ iMacHome$ brew list
autoconf libksba libxslt pkg-config
automake libtool libyaml readline
libgpg-error libxml2 openssl
Michaels-iMac:~ iMacHome$
好像有……
【问题讨论】:
-
尝试使用 Homebrew 安装
libxml2。 -
我已经做到了。还是有问题。
-
你用的是系统ruby还是RVM,rbenv ruby manager?
-
你能显示使用 brew installed 安装的库吗?可以交叉检查,看看有什么遗漏。因为它对我有用,我没有安装 libxml。
-
@maxd 我正在使用 RVM....我想。
标签: ruby-on-rails osx-mavericks libxml2