Ruby 构建geocanvas本机扩展失败

Ruby 构建geocanvas本机扩展失败,ruby,rubygems,fedora,Ruby,Rubygems,Fedora,我正在四处寻找类似的问题,但我找不到尚未实施的解决方案: 我已经安装了ruby和gems,但是有点问题,我无法更新软件包 $ yum install gcc gcc-c++ ruby ruby-devel rubygems Loaded plugins: langpacks, refresh-packagekit Package gcc-4.8.2-7.fc20.x86_64 already installed and latest version Package gcc-c++-4.8.2-

我正在四处寻找类似的问题,但我找不到尚未实施的解决方案:

我已经安装了ruby和gems,但是有点问题,我无法更新软件包

$ yum install gcc gcc-c++ ruby ruby-devel rubygems

Loaded plugins: langpacks, refresh-packagekit
Package gcc-4.8.2-7.fc20.x86_64 already installed and latest version
Package gcc-c++-4.8.2-7.fc20.x86_64 already installed and latest version
Package ruby-2.0.0.353-16.fc20.x86_64 already installed and latest version
Package ruby-devel-2.0.0.353-16.fc20.x86_64 already installed and latest version
Package rubygems-2.1.11-115.fc20.noarch already installed and latest version
Nothing to do
Ruby版本:

$ ruby -v
ruby 2.0.0p353 (2013-11-22 revision 43784) [x86_64-linux]
我粘贴出现在goocanvas上的消息,更新为root:

Updating goocanvas
Building native extensions.  This could take a while...
ERROR:  Error installing goocanvas:
    ERROR: Failed to build gem native extension.

    /usr/bin/ruby extconf.rb
checking for -Wall option to compiler... yes
checking for -Waggregate-return option to compiler... yes
checking for -Wcast-align option to compiler... yes
checking for -Wextra option to compiler... yes
checking for -Wformat=2 option to compiler... yes
checking for -Winit-self option to compiler... yes
checking for -Wlarger-than-65500 option to compiler... yes
checking for -Wmissing-declarations option to compiler... yes
checking for -Wmissing-format-attribute option to compiler... yes
checking for -Wmissing-include-dirs option to compiler... yes
checking for -Wmissing-noreturn option to compiler... yes
checking for -Wmissing-prototypes option to compiler... yes
checking for -Wnested-externs option to compiler... yes
checking for -Wold-style-definition option to compiler... yes
checking for -Wpacked option to compiler... yes
checking for -Wp,-D_FORTIFY_SOURCE=2 option to compiler... yes
checking for -Wpointer-arith option to compiler... yes
checking for -Wswitch-default option to compiler... yes
checking for -Wswitch-enum option to compiler... yes
checking for -Wundef option to compiler... yes
checking for -Wunsafe-loop-optimizations option to compiler... yes
checking for -Wwrite-strings option to compiler... yes
checking for rb_define_alloc_func() in ruby.h... yes
checking for rb_block_proc() in ruby.h... yes
checking for new allocation framework... yes
checking for attribute assignment... no
checking for rb_errinfo() in ruby.h... yes
checking for cairo... yes
checking for rb_cairo.h... no
*** 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}/lib64
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/usr/bin/ruby
    --with-pkg-config
    --without-pkg-config
    --with-override-variables
    --without-override-variables


Gem files will remain installed in /usr/local/share/gems/gems/pango-2.1.0 for inspection.
Results logged to /usr/local/share/gems/gems/pango-2.1.0/ext/pango/gem_make.out

问题是这些gems是通过fedora存储库安装的


使用yum卸载并使用gem重新安装,成功了。

您是否已安装?是的,它已安装:
pango-1.36.1-2.fc20.x86_64
PS:谢谢您的更正。您有什么建议?您是否查看了引用的日志(
/usr/local/share/gems/gems/pango-2.1.0/ext/pango/gem_make.out
)?您应该在这里包含它(除非它与输出中已经包含的内容完全相同)。是的,它是相同的。但是,必须更新并显示相关错误的软件包如下:
goocanvas(1.2.6<2.1.0)gstreamer(2.0.2<2.1.0)gtk2(2.0.2<2.1.0)pango(2.0.2<2.1.0)
通常,总是使用RubyGems来安装gems,而不是OS软件包管理器(可能是yum、apt等)。