精通
英语
和
开源
,
擅长
开发
与
培训
,
胸怀四海
第一信赖
锐英源精品开源心得,转载请注明:“锐英源www.wisestudy.cn,孙老师作品,电话13803810136。需要全文内容也请联系孙老师。
If you encounter an error or warning you don’t understand, check this chapter for solutions to common warnings and errors that the mod_perl community has encountered in the last few years.
如果你遇到一个你不明白的错误或警告,检查本章中mod_perl社区在过去的几年里遇到的警告和错误的解决方案。
Perl’s warnings mode is immensely helpful in detecting possible problems. Make sure you always turn on warnings while you are developing code. See The Importance of Warnings.
Enabling use diagnostics; generally helps you to determine the source of the problem and how to solve it. See diagnostics pragma for more information.
Perl的警告模式对检测可能出现的问题是非常有帮助的。当你开发代码时确保你总是打开警告。看到警告的重要性。
允许使用诊断;通常可以帮助您确定问题的根源以及如何解决它。更多有关信息,请参见诊断编译指示。
When building mod_perl one may get the following failure: 在构建mod_perl时可能会遇到以下故障:
make[1]: Entering directory ‘.../mod_perl-1.29/Symbol’ 、
Running Mkbootstrap for Apache::Symbol ()
...
Bareword "gensym" not allowed while "strict subs" in use at
/usr/lib/perl5/5.8.3/Pod/Parser.pm line 1158.
...
make: *** [subdirs] Error 2
That happens when you you’ve modify @INC to push "." before all other directories, whereas it should be last. When "." is first in @INC it picks mod_perl-1.29/Symbol/Symbol.pm when it’s inside the directory mod_perl-1.29/Symbol. This shouldn’t happen if your system paths are coming first. To check your @INC, run:
当你在所有其他目录之前按”.“来修改@INC,而它应该是最后一次。当”.”是在@INC内的第一个,且它在mod_perl-1.29/Symbol目录下,它挑选mod_perl-1.29/Symbol/Symbol.pm。如果你的系统路径是第一个,这就不会发生。检查你@INC运行:
% perl -V
and it’ll appear at the end of the output. Usually "." is pushed first by setting a PERL5LIB or a similar environment variable. Unset it and repeat the build process to solve the problem. 它会出现在输出的末尾。通常”.”是通过设置一个PERL5LIB或类似的环境变量第一个输出。设置并重复构建过程来解决这个问题。
make: *** No rule to make target
‘/usr/lib/perl5/5.8.3/i386-linux/CORE/config.h’,
needed by ‘Makefile’. Stop.
That means that your Perl installation is incomplete. Usually this is the case on package based distros, where perl is split across multiple packages. Usually you need to install the Perl-devel package to be able to build any other Perl modules that include XS extensions.
这意味着你的Perl安装是不完整的。通常这是基于包的发行版中, perl是一分为二,多个封装。通常你需要安装perl-devel包才可以建立任何其他Perl模块,包括x扩展。
See make Troubleshooting and make test Troubleshooting 制作故障诊断和故障诊断测试