我正在尝试使用最新版本的Perlbrew在运行macOS-Sierra的计算机上安装具有多线程功能的Perl (5.24.1)的最新稳定版本。
Perlbrew似乎已正确安装,但当我运行以下命令时:
Perlbrew install perl-5.24.1 --thread or
perlbrew install stable --thread安装继续进行,但随后失败,并显示以下消息
Installation process failed. To spot any issues, check
/Users/alan/perl5/perlbrew/build.perl-5.24.1.log
If some perl tests failed and you still want to install this distribution anyway,
do:
(cd /Users/alan/perl5/perlbrew/build/perl-5.24.1; make install)
You might also want to try upgrading patchperl before trying again:按照上面的建议查看日志文件,我在文件末尾发现了以下错误消息:
1 error generated.
make[1]: *** [HiRes.o] Error 1
cc -c -fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fstack- protector-strong -I/usr/local/include -Wall -Werror=declaration-after-statement -Wextra -Wc++-compat -Wwrite-strings -Wthread-safety -O3 -DVERSION=\"1.9733\" -DXS_VERSION=\"1.9733\" "-I../.." -DTIME_HIRES_NANOSLEEP -DTIME_HIRES_CLOCK_GETTIME -DTIME_HIRES_CLOCK_GETRES -DTIME_HIRES_CLOCK_NANOSLEEP -DTIME_HIRES_CLOCK -DTIME_HIRES_STAT=1 -DATLEASTFIVEOHOHFIVE HiRes.c
HiRes.xs:945:15: error: use of undeclared identifier 'darwin_time_mutex'
MUTEX_INIT(&darwin_time_mutex);
^
1 error generated.
make[1]: *** [HiRes.o] Error 1
Unsuccessful make(dist/Time-HiRes): code=512 at make_ext.pl line 569.
make: *** [lib/auto/Time/HiRes/HiRes.bundle] Error 25
##### Brew Failed #####"在日志文件中的其他位置,以下消息也会多次出现(尽管我不知道这与失败的安装过程有多相关):
ld: warning: object file (xxxxxxxx) was built for newer OSX version (10.12) than being linked (10.4)我在网上搜索过类似的问题,但找不到任何相似的问题。因此,我想知道这是Perlbrew和Sierra的一般问题,还是我的设置所特有的问题。
显然,我在Perl编程和编程方面是个初学者,所以请尽量保持回答的简单
谢谢你的帮助
发布于 2017-01-27 00:39:22
你不是唯一的一个:这是一个bug。请参阅Bug #128972 for perl5: Build failure on OS X 10.12 Sierra
看起来这个bug已经在5.26.0版本中解决了,但是还没有返回到5.24.2和5.22.4版本。
您可以尝试使用最先进的版本(但这很可能会有其他问题):
perlbrew install perl-bleadhttps://stackoverflow.com/questions/41877766
复制相似问题