在MacOSX 10.6上为perl安装GD库

在MacOSX 10.6上为perl安装GD库,第1张

概述我一直试图为perl安装GD库,但是很久没有用了.我尝试过在互联网上找到的所有小东西,但没有.我想要获得需要GD包的Circos图. 当我尝试通过CPAN安装它时,它给了我这个错误: Running make testPERL_DL_NONLAZY=1 /usr/bin/perl/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib 我一直试图为perl安装GD库,但是很久没有用了.我尝试过在互联网上找到的所有小东西,但没有.我想要获得需要GD包的Circos图.

当我尝试通过CPAN安装它时,它给了我这个错误:

Running make testPERL_DL_NONLAZY=1 /usr/bin/perl/perl "-MExtUtils::Command::MM" "-e" "test_harness(0,'blib/lib','blib/arch')" t/*.tt/GD.t ........ 1/12 Can't load './blib/arch/@R_502_6843@/GD/GD.bundle' for module GD: dlopen(./blib/arch/@R_502_6843@/GD/GD.bundle,2): Symbol not found: _jpeg_resync_to_restart  Referenced from: /usr/lib/libgd.2.dylib  Expected in: flat namespace in /usr/lib/libgd.2.dylib at /opt/local/lib/perl5/5.14.1/darwin-multi-2level/DynaLoader.pm line 194. at t/GD.t line 14Compilation Failed in require at t/GD.t line 14.BEGIN Failed--compilation aborted at t/GD.t line 14.t/GD.t ........ dubIoUs,test returned 2 (wstat 512,0x200)Failed 12/12 subtests t/polyline.t .. Can't load '/Users/zehira/.cpan/build/GD-2.46-mp3nuO/blib/arch/@R_502_6843@/GD/GD.bundle' for module GD: dlopen(/Users/zehira/.cpan/build/GD-2.46-mp3nuO/blib/arch/@R_502_6843@/GD/GD.bundle,2): Symbol not found: _jpeg_resync_to_restart  Referenced from: /usr/lib/libgd.2.dylib  Expected in: flat namespace in /usr/lib/libgd.2.dylib at /opt/local/lib/perl5/5.14.1/darwin-multi-2level/DynaLoader.pm line 194. at /Users/zehira/.cpan/build/GD-2.46-mp3nuO/blib/lib/GD/polyline.pm line 45Compilation Failed in require at /Users/zehira/.cpan/build/GD-2.46-mp3nuO/blib/lib/GD/polyline.pm line 45.BEGIN Failed--compilation aborted at /Users/zehira/.cpan/build/GD-2.46-mp3nuO/blib/lib/GD/polyline.pm line 45.Compilation Failed in require at t/polyline.t line 10.BEGIN Failed--compilation aborted at t/polyline.t line 10.t/polyline.t .. dubIoUs,0x200)Failed 1/1 subtests Test Summary Report-------------------t/GD.t      (Wstat: 512 Tests: 1 Failed: 1)  Failed test:  1  Non-zero exit status: 2  Parse errors: Bad plan.  You planned 12 tests but ran 1.t/polyline.t (Wstat: 512 Tests: 0 Failed: 0)  Non-zero exit status: 2  Parse errors: Bad plan.  You planned 1 tests but ran 0.files=2,Tests=1,0 wallclock secs ( 0.02 usr  0.01 sys +  0.04 cusr  0.01 csys =  0.08 cpu)Result: FAILFailed 2/2 test programs. 1/1 subtests Failed.make: *** [test_dynamic] Error 2  LDS/GD-2.46.tar.gz  make test -- NOT OK//hint// to see the cpan-testers results for installing this module,try:  reports LDS/GD-2.46.tar.gzRunning make install  make test had returned bad status,won't install without forceFailed during this command: LDS/GD-2.46.tar.gz                           : make_test NO

我试图用–enable-shared –enable-static选项重新安装jpeg库,但也没有帮助.我还安装了一个MacPorts版本的perl,以为我可能搞砸了我的mac附带的perl安装.任何人都知道为什么会发生这种情况?

(是的,我对终端世界相对较新,所有这一切,我仍然试图绕过我的路)

谢谢!

解决方法 我用 homebrew解决了这个问题,首先安装了libgd,然后是cpan.它工作得很好.

brew install libgdcpan install GD
总结

以上是内存溢出为你收集整理的在MacOSX 10.6上为perl安装GD库全部内容,希望文章能够帮你解决在MacOSX 10.6上为perl安装GD库所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/langs/1242302.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-06-06
下一篇2022-06-06

发表评论

登录后才能评论

评论列表(0条)

    保存