簡體   English   中英

Fedora 24-Ruby on Rails安裝錯誤

[英]Fedora 24 - Ruby on Rails installation error

我嘗試在新的Fedora 24安裝中安裝滑軌。 我遵循了本教程https://developer.fedoraproject.org/tech/languages/ruby/ror-installation.html

但是我得到了這個錯誤:

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

我用谷歌搜索解決方案,但沒有成功。 你能給我建議嗎? 謝謝

您是否已根據日志中的錯誤消息安裝了“開發工具”?

編譯器無法生成可執行文件。 (RuntimeError)

您必須先安裝開發工具。

鏈接的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