安装 Perl 5.26.0 时出错 (generate_uudmap.o)

Error (generate_uudmap.o) during Perl 5.26.0 installation

我正在尝试在没有根访问权限的 CentOS 7 系统上安装 Perl 5.26.0。我在另一个 CentOS 6 系统上安装那个版本的 Perl 没有问题。这是我执行的配置命令:

./Configure -des -Dusethreads -Dprefix=$INSTALL_PATH/$SOFTWARE-$VERSION

这是我得到的错误:

gcc -c -DPERL_CORE -D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -std=c89 -O2 -Wall -Werror=declaration-after-statement -Wextra -Wc++-compat -Wwrite-strings generate_uudmap.c
In file included from /path/to/include/string.h:635:0,
                 from generate_uudmap.c:10:
/path/to/include/bits/string3.h:129:1: error: C++ style comments are not allowed in ISO C90
 // XXX We have no corresponding builtin yet.
 ^
/path/to/include/bits/string3.h:129:1: error: (this will be reported only once per input file)
make: *** [Makefile:250: generate_uudmap.o] Error 1

好的,现在可以了! :D。在 Configure 抛出错误后,我进入 sflags 文件并注释行 #13: stdflags=" -std=c89" I 运行 make again 然后 make install

在 Centos 7 Perl 版本 5.30.2 中更改为 c99stdflags=" -std=c89" 在 cflags 文件中:

旧线

stdflags=" -std=c89"

换行

stdflags=" -std=c99"

并进行安装(无./Configure -des -Dprefix=...