在 MacOSX 10.6 上安装 Perl 的 GD 库

发布于 2024-12-02 11:53:34 字数 2741 浏览 3 评论 0原文

我一直在尝试安装 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 安装。任何人都知道为什么会发生这种情况?

(是的,我对终端世界和所有这些都比较陌生,并且仍在尝试导航)

谢谢!

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!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

七婞 2024-12-09 11:53:34

我已经解决了这个问题,首先使用 homebrew 安装 libgd,然后 cpan。效果非常好。

brew install libgd

cpan install GD

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

brew install libgd

cpan install GD
为你拒绝所有暧昧 2024-12-09 11:53:34

一步步安装它,没有任何问题

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

也许这有帮助......

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...

深居我梦 2024-12-09 11:53:34

首先我也是一个 circos 用户:) 在 win/linux/mac 上安装 circos for perl 和 circos 需要的模块确实不容易。

在我的实践之上,你最好从一开始就这样做:

  1. 安装perl(选择非常流行的新版本)
  2. 安装circos(参考http://circos.ca/software/installation/)
  3. 安装 circos 需要的模块,但排除 GD:这很简单,只需下载并复制,或通过 CPAN 安装(参考 http://www.rcbowen.com/imho/perl/modules.html)
  4. 安装GD :GD 是一个特殊模块(不独立于平台),您应该在您的操作系统上构建它,然后安装:http://www.sharedproteomics.com/forum /showthread.php?325-Installing-GD-on-Mac-OSX-10.6

看起来你的问题出在第3步!如果 Google 无法帮助您实现此目的,请求帮助的另一种方式是使用 circos 的 google 群组: http://groups.google.com/group/circos-data-visualization Martin 和其他 circos 用户将直接为您提供帮助。

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.

始终不够爱げ你 2024-12-09 11:53:34

对于 Circos 安装的先决条件,CircosAPI 的文档非常有帮助。它是为 OSX 10.8 编写的,并且仍然适用于 OS X Yosemite‎。

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

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/

〆凄凉。 2024-12-09 11:53:34

您需要libgd。如果您使用的是 ubuntu &您可以使用以下方式获取它

sudo apt-get install libgd-gd2-perl

然后您可以按照circos安装说明中提到的正常过程进行操作。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文