gpt4 book ai didi

perl - 无法使用 cpan 在 darwin 13.0.1 上安装 GD 模块

转载 作者:行者123 更新时间:2023-12-04 19:26:17 25 4
gpt4 key购买 nike

我很难安装GD。我正在运行 Mas OSX 10.9.2 darwin 13.0.1
当我运行这个:
cpan[1]> 安装 GD
perl -MCPAN -e 外壳

我收到以下错误:

cpan[1]> install GD
Reading '/Users/me/.cpan/Metadata'
Database was generated on Sun, 21 Dec 2014 18:53:17 GMT
Running install for module 'GD'
Running make for L/LD/LDS/GD-2.56.tar.gz
Checksum for /Users/me/.cpan/sources/authors/id/L/LD/LDS/GD-2.56.tar.gz ok
Scanning cache /Users/me/.cpan/build for sizes
............................................................................DONE

CPAN.pm: Building L/LD/LDS/GD-2.56.tar.gz

Configuring for libgd version 2.0.11.
Checking for stray libgd header files...none found.

GD library used from: /usr/local

Please choose the features that match how libgd was built:
Undefined subroutine &main::prompt called at Build.PL line 169.
Warning: No success on command[/usr/bin/perl Build.PL ]
'YAML' not installed, will not store persistent state
LDS/GD-2.56.tar.gz
/usr/bin/perl Build.PL -- NOT OK
Running Build test
Make had some problems, won't test
Running Build install
Make had some problems, won't install
Could not read metadata file. Falling back to other methods to determine prerequisites
Failed during this command:
LDS/GD-2.56.tar.gz : writemakefile NO '/usr/bin/perl Build.PL ' returned status 512

最佳答案

Build.PL正在尝试调用名为 prompt 的函数但它不存在。这是因为他们最近将构建系统从 ExtUtils::MakeMaker (Makefile.PL) 切换到 Module::Build (Build.PL),但没有完全转换程序。我有 reported the bug .

大多数人没有注意到这一点,因为只有在 GD 无法自行配置时才需要提示。它通过查找 gdlib-config 程序来做到这一点。如果找不到,或者它不起作用,它会询问您的 gdlib 配置。最好让 gdlib-config 来处理它。解决此问题的最佳方法是确保 gdlib-config 在您的 PATH 中的某个位置并且 gdlib-config --all作品。

否则替换 prompt 的所有实例在 Build.PLModule::Build->prompt它应该可以工作。

关于perl - 无法使用 cpan 在 darwin 13.0.1 上安装 GD 模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27597167/

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