简体   繁体   English

Fedora 24-Ruby on Rails安装错误

[英]Fedora 24 - Ruby on Rails installation error

I tried install rails on my fresh Fedora 24 instalation . 我尝试在新的Fedora 24安装中安装滑轨。 I followed this tutorial https://developer.fedoraproject.org/tech/languages/ruby/ror-installation.html . 我遵循了本教程https://developer.fedoraproject.org/tech/languages/ruby/ror-installation.html

But I got this error: 但是我得到了这个错误:

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

current directory: /usr/local/share/gems/gems/nio4r-1.2.1/ext/nio4r
/usr/bin/ruby -r ./siteconf20160918-22847-14vriyi.rb extconf.rb
checking for unistd.h... *** 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_BASE_NAME)
/usr/share/ruby/mkmf.rb:456:in `try_do': The compiler failed to generate    an executable file. (RuntimeError)
You have to install development tools first.
from /usr/share/ruby/mkmf.rb:587:in `try_cpp'
from /usr/share/ruby/mkmf.rb:1091:in `block in have_header'
from /usr/share/ruby/mkmf.rb:942:in `block in checking_for'
from /usr/share/ruby/mkmf.rb:350:in `block (2 levels) in postpone'
from /usr/share/ruby/mkmf.rb:320:in `open'
from /usr/share/ruby/mkmf.rb:350:in `block in postpone'
from /usr/share/ruby/mkmf.rb:320:in `open'
from /usr/share/ruby/mkmf.rb:346:in `postpone'
from /usr/share/ruby/mkmf.rb:941:in `checking_for'
from /usr/share/ruby/mkmf.rb:1090:in `have_header'
from extconf.rb:3:in `<main>'

To see why this extension failed to compile, please check the mkmf.log which can be found here:

/usr/local/lib64/gems/ruby/nio4r-1.2.1/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /usr/local/share/gems/gems/nio4r-1.2.1 for inspection.
Results logged to /usr/local/lib64/gems/ruby/nio4r-1.2.1/gem_make.out

I googled solution but I wasn't successful. 我用谷歌搜索解决方案,但没有成功。 Can you please give me advice? 你能给我建议吗? Thanks 谢谢

Have you installed "development tools", per the error message in your logs? 您是否已根据日志中的错误消息安装了“开发工具”?

The compiler failed to generate an executable file. 编译器无法生成可执行文件。 (RuntimeError) (RuntimeError)

You have to install development tools first. 您必须先安装开发工具。

From the linked Fedora ROR installation guide : 链接的Fedora ROR安装指南中

sudo dnf group install "C Development Tools and Libraries"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM