2

我正在使用 Rails 3.2 和 ruby​​ 1.9.2。我已将 gem 'fcgi' (fastcgi) 添加到我的 Gemfile 中,但是当我运行 bundle install 时,它在 fcgi 上失败了。

输出:

Installing fcgi (0.9.1) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /Users/johndcowan/.rvm/rubies/ruby-1.9.2-p318/bin/ruby extconf.rb 
checking for fcgiapp.h... no
checking for fastcgi/fcgiapp.h... no

make
make: *** No targets.  Stop.


Gem files will remain installed in /Users/johndcowan/.rvm/gems/ruby-1.9.2-p318/gems/fcgi- 0.9.1 for inspection.
Results logged to /Users/johndcowan/.rvm/gems/ruby-1.9.2-p318/gems/fcgi-0.9.1/ext/fcgi/gem_make.out
An error occured while installing fcgi (0.9.1), and Bundler cannot continue.
Make sure that `gem install fcgi -v '0.9.1'` succeeds before bundling.
Installing fcgi (0.9.1) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

/Users/johndcowan/.rvm/rubies/ruby-1.9.2-p318/bin/ruby extconf.rb 
checking for fcgiapp.h... no
checking for fastcgi/fcgiapp.h... no

make
make: *** No targets.  Stop.


Gem files will remain installed in /Users/johndcowan/.rvm/gems/ruby-1.9.2-p318/gems/fcgi-0.9.1 for inspection.
Results logged to /Users/johndcowan/.rvm/gems/ruby-1.9.2-p318/gems/fcgi-0.9.1/ext/fcgi/gem_make.out
An error occured while installing fcgi (0.9.1), and Bundler cannot continue.
Make sure that `gem install fcgi -v '0.9.1'` succeeds before bundling.

然后,我按照建议运行了 gem install:

johns-MacBook-Pro:drywall johndcowan$ sudo gem install fcgi -v '0.9.1'
Fetching: fcgi-0.9.1.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing fcgi:
ERROR: Failed to build gem native extension.

/Users/johndcowan/.rvm/rubies/ruby-1.9.2-p318/bin/ruby extconf.rb
checking for fcgiapp.h... no
checking for fastcgi/fcgiapp.h... no

make
make: *** No targets.  Stop.

Gem files will remain installed in /Users/johndcowan/.rvm/rubies/ruby-1.9.2-p318/lib/ruby/gems/1.9.1/gems/fcgi-0.9.1 for inspection.
Results logged to /Users/johndcowan/.rvm/rubies/ruby-1.9.2-p318/lib/ruby/gems/1.9.1/gems/fcgi-0.9.1/ext/fcgi/gem_make.out
johns-MacBook-Pro:drywall johndcowan$

我找到了一个有同样问题的用户,他/她使用 yum 安装了 fcgi_devel,这解决了他/她的 fcgi 问题。我尝试使用端口安装,但它不起作用。同一个网站说我不需要百胜。

sudo port install fcgi-devel
Error: Port fcgi-devel not found

有任何想法吗?

4

1 回答 1

2

如果使用 Homebrew,请先尝试brew install fastcgi

于 2013-04-09T22:22:34.130 回答