首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >gem安装心理错误

gem安装心理错误
EN

Stack Overflow用户
提问于 2013-02-21 01:55:01
回答 3查看 2.7K关注 0票数 2

我正在尝试捆绑安装一个rails项目,但是我被卡住了……当我尝试运行gem install psych时,得到的结果是:

代码语言:javascript
复制
Building native extensions.  This could take a while...
ERROR:  Error installing psych:
        ERROR: Failed to build gem native extension.

        /Users/gibatronic/.rvm/rubies/ruby-1.9.3-p327/bin/ruby extconf.rb
checking for yaml.h... no
yaml.h is missing. Try 'port install libyaml +universal' or 'yum install libyaml-devel'
*** 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.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/Users/gibatronic/.rvm/rubies/ruby-1.9.3-p327/bin/ruby
    --with-libyaml-dir
    --without-libyaml-dir
    --with-libyaml-include
    --without-libyaml-include=${libyaml-dir}/include
    --with-libyaml-lib
    --without-libyaml-lib=${libyaml-dir}/lib


Gem files will remain installed in /Users/gibatronic/.rvm/gems/ruby-1.9.3-p327/gems/psych-1.3.4 for inspection.
Results logged to /Users/gibatronic/.rvm/gems/ruby-1.9.3-p327/gems/psych-1.3.4/ext/psych/gem_make.out

我在OS X 10.8.2上运行ruby 1.9.3p327rails 3.2.12

我已经在rvm pkg install libyaml上安装了libyaml 0.1.4

我真的不知道该怎么办了!

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2013-02-21 06:18:05

安装libyaml

代码语言:javascript
复制
port install libyaml +universal
票数 2
EN

Stack Overflow用户

发布于 2014-02-04 02:05:14

代码语言:javascript
复制
apt-get install libyaml-dev

我在基于Debian 7的系统上运行的情况下修复了吗(可能对Ubuntu也是如此)

票数 3
EN

Stack Overflow用户

发布于 2014-01-09 20:38:35

在我的例子中,我必须设置CFLAGS和LDFLAGS变量:

代码语言:javascript
复制
# ensure libyaml is installed
port install libyaml +universal

# if you like you can check the location of the installied files (especially the .h file)
# port contents libyaml

# now configure with these options
CFLAGS="-I/opt/local/include/ "  LDFLAGS="-L/opt/local/lib/" ./configure
make
sudo make install
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/14986663

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档