我正在尝试使用 JS gettext 库 ( http://jsgettext.berlios.de/ ) 中的 po2json 解析器/转换器,但是当我尝试转换时出现此错误:
Can't locate JSON.pm in @INC (@INC contains: /Library/Perl/5.12/darwin-thread-multi-2level /Library/Perl/5.12 /Network/Library/Perl/5.12/darwin-thread-multi-2level /Network/Library/Perl/5.12 /Library/Perl/Updates/5.12.4 /System/Library/Perl/5.12/darwin-thread-multi-2level /System/Library/Perl/5.12 /System/Library/Perl/Extras/5.12/darwin-thread-multi-2level /System/Library/Perl/Extras/5.12 .) at ./po2json line 23.
BEGIN failed--compilation aborted at ./po2json line 23.
据我了解,我缺少一个 perl 模块,即 JSON.pm,我认为是这个:http ://cpansearch.perl.org/src/MAKAMAKA/JSON-2.53/lib/JSON.pm
现在,我如何在 OSX 上安装它?我正在使用山狮。
我试着做cpan install JSON
,但它不起作用,我收到以下错误:
Writing Makefile for JSON
MAKAMAKA/JSON-2.53.tar.gz
make -- NOT OK
'YAML' not installed, will not store persistent state
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible