- 操作系统:Ubuntu 14.04 LTS
- Ruby 版本:2.3.1p112
gem -v
--> 2.5.1a2enmod fastcgi
-->Module fastcgi already enabled
我尝试运行gem install fcgi
但失败并出现此错误
have_header: checking for fastcgi/fcgiapp.h... -------------------- no
"gcc -E -I/usr/local/include/ruby-2.3.0/x86_64-linux -I/usr/local/include/ruby-2.3.0/ruby/backward -I/usr/local/include/ruby-2.3.0 -I. -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-pare$conftest.c:3:29: fatal error: fastcgi/fcgiapp.h: No such file or directory
#include <fastcgi/fcgiapp.h>
^
compilation terminated.
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <fastcgi/fcgiapp.h>
/* end */
我是否遗漏了某个依赖项?Github由于“CGI DEV KIT”的链接已损坏,因此该 gem 的页面根本没用。
答案1
成功编译 gem 所需的库:
sudo apt-get install libfcgi libfcgi-dev