开发者

Installing GD library for perl on MacOSX 10.6

开发者 https://www.devze.com 2023-04-01 07:24 出处:网络
I have been trying to install GD library for perl to no avail a long while now. I\'ve tried every little thing I could find on the internets but nothing. I am trying to get Circos graphs which require

I have been trying to install GD library for perl to no avail a long while now. I've tried every little thing I could find on the internets but nothing. I am trying to get Circos graphs which require the GD package.

When I try to install it through CPAN it gives me this error:

    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

I tried to reinstall jpeg libraries with --enable-shared --enable-static options but didn't help either. I also installed a MacPorts version of perl thinking I might have messed up the perl installation that comes with my mac. Anyone have any idea why this might be happening?

(yes, I'm relatively new to the world of terminal and all this and am still trying to navigate my way around)

Thanks!


I have solved this issue using homebrew to install libgd first, and then cpan. It worked perfectly.

brew install libgd

cpan install GD


i installed it step by step without any problem by

http://zientzilaria.herokuapp.com/blog/2012/06/03/installing-circos-on-os-x/

maybe that helps...


Firstly I'm also a circos user :) It's really not simple to install circos on win/linux/mac for perl and the modules circos needs .

Above my practice you'd better do like this from very begin:

  1. install perl (choose the very popular new version)
  2. install circos (ref http://circos.ca/software/installation/)
  3. install the modules circos needs but exclude GD : this is easy, just download and copy, or install by CPAN (ref http://www.rcbowen.com/imho/perl/modules.html)
  4. install GD : GD is a special module (not platform independently ), and you should build it on your OS and then install : http://www.sharedproteomics.com/forum/showthread.php?325-Installing-GD-on-Mac-OSX-10.6

It looks like your problem is at step3 !!! If Google can not help you to make it, another way to request help is using circos's google group: http://groups.google.com/group/circos-data-visualization there Martin and other circos users will help you directly.


For prerequisite of Circos installation, the documentation from CircosAPI is very helpful. It was written for OSX 10.8, and still works for OS X Yosemite‎.

http://kylase.github.io/CircosAPI/os-x-installation-guide/


You need libgd. If you are using ubuntu & you can get it using

sudo apt-get install libgd-gd2-perl

Then you can follow the normal procedure as mentioned in circos installation instructions.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号