While working on Nginx installation from source, I got the following error when I try to run nginx after compilation –
[root@localhost nginx-1.6.0]# /usr/sbin/nginx
Can’t load ‘/usr/local/lib64/perl5/auto/nginx/nginx.so’ for module nginx: /usr/local/lib64/perl5/auto/nginx/nginx.so: undefined symbol: ngx_http_perl_handle_request at /usr/share/perl5/XSLoader.pm line 68.
at /usr/local/lib64/perl5/nginx.pm line 56.
Compilation failed in require.
BEGIN failed–compilation aborted.
nginx: [alert] perl_parse() failed: 255
The problem occur when I was trying to install the nginx 1.6.0 version on CentOS 7.
It was nginx perl module ,I was enabling while compling.
As per Nginx
--with-http_perl_module enable ngx_http_perl_module
Solution: To solve this problem use the below given additional option with configure script (i.e
./configure --with-http_perl_module --with-ld-opt="-Wl,-E"
And then use below given command for further installation
make && make install
I have nginx compiled with the same options but still I am getting the “undefined symbol” error on my centos7 server
Can’t load ‘/usr/lib64/perl5/lib/perl5/x86_64-linux-thread-multi/auto/Nginx/Nginx.so’ for module Nginx: /usr/lib64/perl5/lib/perl5/x86_64-linux-thread-multi/auto/Nginx/Nginx.so: undefined symbol: ngx_http_perl_handle_request at /usr/share/perl5/XSLoader.pm line 68.
at /usr/lib64/perl5/lib/perl5/x86_64-linux-thread-multi/Nginx.pm line 110.
Compilation failed in require at /usr/local/share/perl5/Nginx/Redis.pm line 15.
BEGIN failed–compilation aborted at /usr/local/share/perl5/Nginx/Redis.pm line 15.
Compilation failed in require at Trigger.pm line 6.
BEGIN failed–compilation aborted at Trigger.pm line 6.
You have new mail in /var/spool/mail/root
sharad chhetri says
Which Nginx version are you installing.
The error is showing on “/usr/local/share/perl5/Nginx/Redis.pm” , do you need redis module ?
I appreciate if you could provide the all commands which you are using for installing Nginx.
Worked on Fedora 20 also! Thanks!
sharad chhetri says
Glad to see, it works on Fedora 20. This info is helpful for other users also.
Thank you, this works. However, can you elaborate on what exactly it does that makes it work?
Thanks this worked