2011-08-31 105 views
3

我一直在嘗試爲perl安裝GD庫,現在無濟於事。我已經嘗試了所有可以在互聯網上找到的東西,但都沒有。我試圖獲得需要GD包的Circos圖。在MacOSX上安裝perl的GD庫10.6

當我試圖通過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 

我試圖重新安裝JPEG庫使用--enable-共享--enable-static選項,但沒有幫助。我還安裝了一個MacPorts版本的perl,以爲我可能搞砸了我的mac自帶的perl安裝。任何人都有任何想法,爲什麼這可能會發生?

(是的,我是比較新的終端的世界,這一切,我仍然試圖導航在我的方式)

謝謝!

回答

0

首先,我也是一個circos用戶:)在win/linux/mac上安裝circus for perl和circos需要的模塊真的不是那麼簡單。

我上面的練習,你最好做這樣從非常開始:

  1. 安裝perl(選擇非常流行的新版本)
  2. 安裝circos(REF http://circos.ca/software/installation/
  3. 安裝模塊circos需要但不包括GD:這個很簡單,只需下載和拷貝,或通過CPAN安裝(REF 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的谷歌組:http://groups.google.com/group/circos-data-visualization Martin和其他circos用戶將直接幫助您。

-1

你需要libgd。如果你正在使用ubuntu &您可以使用

sudo apt-get install libgd-gd2-perl 

然後你就可以按照正常程序在安裝circos說明書中提及的得到它。

4

我解決了使用homebrew先安裝的libgd這個問題,然後CPAN。它工作完美。

brew install libgd 

cpan install GD 
+0

它不工作:「LD:找不到-lpng16庫」 – SmallChess

+0

奇怪,我沒有-lpng16但你這樣做,我沒有遇到同樣的錯誤...... –