简体   繁体   English

apache2: Perl lib 版本 (5.28.1) 与可执行文件 '/usr/sbin/apache2' 版本 (5.20.2) 不匹配

[英]apache2: Perl lib version (5.28.1) doesn't match executable '/usr/sbin/apache2' version (5.20.2)

I have installed Debian 10 in order to migrate a web server from one machine to this Debian 10 machine.我已经安装了 Debian 10,以便将 Web 服务器从一台机器迁移到这台 Debian 10 机器。 The web server built on apache2 needs mod_perl.建立在 apache2 上的 web 服务器需要 mod_perl。 The module was not found on the new machine, so I installed perl5.28 (and mod_perl.so has been added).新机器上没有找到该模块,所以我安装了perl5.28(并添加了mod_perl.so)。 But now it seems there is a mismatch between a previous perl version (5.20) and the latest one (5.28).但现在看来,以前的 perl 版本 (5.20) 和最新的 (5.28) 不匹配。 I use the perl binary correspondint to v5.28, @INC contains directories related to v5.28 (according to "env -i perl -V").我使用 v5.28 的 perl 二进制对应文件,@INC 包含与 v5.28 相关的目录(根据“env -i perl -V”)。 But when I try to start the apache2 server, I get this error: "apache2: Perl lib version (5.28.1) doesn't match executable '/usr/sbin/apache2' version (5.20.2)".但是,当我尝试启动 apache2 服务器时,出现此错误:“apache2:Perl lib 版本 (5.28.1) 与可执行文件 '/usr/sbin/apache2' 版本 (5.20.2) 不匹配”。 Can anyone help?任何人都可以帮忙吗? Thanks a ton in advance.提前致谢。

When you built apache with mod_perl, you used v5.20, but it seems that's not around anymore.当您使用 mod_perl 构建 apache 时,您使用的是 v5.20,但它似乎不再存在。 Different versions of Perl are not guaranteed (or even attempt to be) binary compatible.不同版本的 Perl 不能保证(或什至试图)二进制兼容。 Between Perl versions, you'll likely have to re-compile all XS modules, too.在 Perl 版本之间,您可能还必须重新编译所有 XS 模块。

You need to recompile apache with the Perl that you want to use, or install the Perl that apache wants to use.你需要用你要使用的Perl重新编译apache,或者安装apache要使用的Perl。 This time you may want to statically compile mod_perl into apache.这一次你可能想把 mod_perl 静态编译成 apache。

This problem isn't specific to Perl, though.不过,这个问题并不是 Perl 特有的。 Many software libraries will complain similarly when you replace the library they compiled against.当您替换它们编译的库时,许多软件库会发出类似的抱怨。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM