无法使用cpan在darwin 13.0.1上安装GD模块 [英] Cannot install GD module on darwin 13.0.1 using cpan

查看:122
本文介绍了无法使用cpan在darwin 13.0.1上安装GD模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要安装GD的工作很艰巨。我正在运行Mas OSX 10.9.2 darwin 13.0.1
运行此命令时:
cpan [1]>安装GD
perl -MCPAN -e shell

I'm having a tough job trying to get GD installed. I'm running a Mas OSX 10.9.2 darwin 13.0.1 When I run this: cpan[1]> install GD perl -MCPAN -e shell

我得到以下错误:

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 试图调用名为提示的函数,但该函数不存在。这是因为他们最近将构建系统从ExtUtils :: MakeMaker(Makefile.PL)切换到了Module :: Build(Build.PL),但没有完全转换程序。我已经报告了该错误

Build.PL is trying to call a function called prompt but it doesn't exist. This is because they recently switched build systems from ExtUtils::MakeMaker (Makefile.PL) to Module::Build (Build.PL) but didn't fully convert the program. I've reported the bug.

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

Most people don't notice this because the prompting is only necessary if GD can't configure itself. It does this by looking for the gdlib-config program. If that can't be found, or it doesn't work, it will ask you for your gdlib configuration. It's best to let gdlib-config take care of that. Best way to solve this problem is to make sure gdlib-config is somewhere in your PATH and that gdlib-config --all works.

否则,将 Build.PL 中所有提示的实例替换为 Module :: Build->提示,它应该可以正常工作。

Otherwise replace all the instances of prompt in Build.PL with Module::Build->prompt and it should work.

这篇关于无法使用cpan在darwin 13.0.1上安装GD模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆