问题描述
我无法在Mac上安装Perl模块。问题似乎出在网闸上。 当模块包含二进制库(* .bundle)时,必须对这些库进行代码签名,以使Gatekeeper能够接受它们。正常
perl Makefile.PL 使 做测试 进行安装
我没有获得有效的代码签名包/库。开箱即用吗? 我收到以下错误
t/pullparser.t ....... Can't load '~/.cpan/build/HTML-Parser-3.73-0/blib/arch/auto/HTML/Parser/Parser.bundle' for module HTML::Parser: dlopen(~/.cpan/build/HTML-Parser-3.73-0/blib/arch/auto/HTML/Parser/Parser.bundle,2): no suitable image found. Did find:
~/.cpan/build/HTML-Parser-3.73-0/blib/arch/auto/HTML/Parser/Parser.bundle: code signature in (~/.cpan/build/HTML-Parser-3.73-0/blib/arch/auto/HTML/Parser/Parser.bundle) not valid for use in process using Library Validation: mapped file has no cdhash,completely unsigned? Code has to be at least ad-hoc signed. at
解决方法
在Mac上,我总是使用cpan或perl-shell安装模块。
尝试一下:
perl -MCPAN -e shell
install HTML::Parser
或
cpan install HTML::Parser