我正在尝试在我的服务器上安装 nginx,但是它一直返回“./configure:错误:需要 perl 5.6.1 或更高版本”,尽管我有 perl v5.8.8!!!!
我已经下载了 perl 并尝试使用以下命令对其进行配置:
./configure --with-http_stub_status_module --with-http_perl_module --with-http_flv_module --add-module=nginx_mod_h264_streaming
输出如下:
[root@fst nginx-0.8.55]# ./configure --with-http_stub_status_module --with-http_perl_module --with-http_flv_module --add-module=nginx_mod_h264_streaming
checking for OS
+ Linux 2.6.18-308.el5 x86_64
checking for C compiler ... found
+ using GNU C compiler
+ gcc version: 4.1.2 20080704 (Red Hat 4.1.2-52)
checking for gcc -pipe switch ... found
checking for gcc builtin atomic operations ... found
checking for C99 variadic macros ... found
checking for gcc variadic macros ... found
checking for unistd.h ... found
checking for inttypes.h ... found
checking for limits.h ... found
checking for sys/filio.h ... not found
checking for sys/param.h ... found
checking for sys/mount.h ... found
checking for sys/statvfs.h ... found
checking for crypt.h ... found
checking for Linux specific features
checking for epoll ... found
checking for sendfile() ... found
checking for sendfile64() ... found
checking for sys/prctl.h ... found
checking for prctl(PR_SET_DUMPABLE) ... found
checking for sched_setaffinity() ... found
checking for crypt_r() ... found
checking for sys/vfs.h ... found
checking for nobody group ... found
checking for poll() ... found
checking for /dev/poll ... not found
checking for kqueue ... not found
checking for crypt() ... not found
checking for crypt() in libcrypt ... found
checking for F_READAHEAD ... not found
checking for posix_fadvise() ... found
checking for O_DIRECT ... found
checking for F_NOCACHE ... not found
checking for directio() ... not found
checking for statfs() ... found
checking for statvfs() ... found
checking for dlopen() ... not found
checking for dlopen() in libdl ... found
checking for sched_yield() ... found
checking for SO_SETFIB ... not found
configuring additional modules
adding module in nginx_mod_h264_streaming
+ ngx_http_h264_streaming_module was configured
checking for PCRE library ... found
checking for system md library ... not found
checking for system md5 library ... not found
checking for OpenSSL md5 crypto library ... found
checking for zlib library ... found
checking for perl
+ perl version: v5.8.8 built for x86_64-linux-thread-multi
./configure: error: perl 5.6.1 or higher is required
答案1
除非你真的知道自己在做什么,否则我建议使用 yum 来安装 nginx。它在 EPEL 存储库中可用,也可能在 rpmforge 中可用。
编辑:由于您需要为 nginx 定制模块,因此最好将自定义构建打包成 RPM。对于小型管理团队来说,在十几台服务器上维护源构建会变得非常困难。
答案2
也许您缺少 Perl 的头文件。尝试安装 Perl 开发包:
yum install perl-devel
答案3
你可能只是缺少开发文件。如果你没有安装以下软件包,我见过这种情况发生
yum install glibc-headers