我一直在尝试为perl安装GD库,但是很久没有用了。我尝试过在互联网上找到的所有小东西,但没有。我想要获得需要GD包的Circos图。
当我尝试通过CPAN安装它时,它给了我这个错误:
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/GD.t ........ 1/12 Can't load './blib/arch/auto/GD/GD.bundle' for module GD: dlopen(./blib/arch/auto/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 14
Compilation 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/auto/GD/GD.bundle' for module GD: dlopen(/Users/zehira/.cpan/build/GD-2.46-mp3nuO/blib/arch/auto/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 45
Compilation 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, test returned 2 (wstat 512, 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: FAIL
Failed 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.gz
Running make install
make test had returned bad status, won't install without force
Failed during this command:
LDS/GD-2.46.tar.gz : make_test NO
我尝试使用--enable-shared --enable-static选项重新安装jpeg库,但也没有帮助。我还安装了一个MacPorts版本的perl,以为我可能搞砸了我的mac附带的perl安装。任何人都知道为什么会发生这种情况?
(是的,我对终端世界相对较新,所有这一切,我仍在努力寻找导航方式)
谢谢!
答案 0 :(得分:6)
我使用homebrew首先安装了libgd,然后是cpan。它运作得很好。
brew install libgd
cpan install GD
答案 1 :(得分:3)
我一步一步地安装了它,没有任何问题
http://zientzilaria.herokuapp.com/blog/2012/06/03/installing-circos-on-os-x/
也许这有帮助...
答案 2 :(得分:0)
首先我也是一个圈子用户:)在win / linux / mac上为perl和模块马戏团需要安装circos真的不是很简单。
在我的练习之上,你最好从一开始就这样做:
看起来你的问题是在第3步!如果Google无法帮助您制作,请求帮助的另一种方法是使用circos的Google群组:http://www.sharedproteomics.com/forum/showthread.php?325-Installing-GD-on-Mac-OSX-10.6 Martin和其他圈子用户将直接为您提供帮助。
答案 3 :(得分:0)
对于Circos安装的先决条件,CircosAPI的文档非常有用。它是为OSX 10.8编写的,仍适用于OS X Yosemite。
答案 4 :(得分:-1)
您需要libgd
。如果您使用的是ubuntu
&你可以使用
sudo apt-get install libgd-gd2-perl
然后您可以按照circos
安装说明中提到的正常程序进行操作。