gpt4 book ai didi

macos - 如何在 OSX 上安装 JSON.pm perl 模块

转载 作者:行者123 更新时间:2023-12-02 15:56:45 25 4
gpt4 key购买 nike

我正在尝试使用 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

最佳答案

使用homebrew安装 cpanm:

brew 安装 cpanm

然后你可以安装 JSON

sudo cpanm install JSON

关于macos - 如何在 OSX 上安装 JSON.pm perl 模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12027327/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com