我正在尝试让Circos安装在我的Mac上(OS Catalina 版本10. 15. 7),我在Perl中工作时遇到了臭名昭著的GD的问题。我已经在网上尝试了几种解决方案,并删除了一切从头开始,但仍然不能让这个dang库工作。最近,我尝试了安装circos的方法,然后安装所有其他依赖项,并以安装GD结束,但这并不奏效。
当我运行“circos”命令时,我得到这样的输出(1):所有其他必要的模块都安装好了,如“circos -modules”所示(2)
我已经尝试使用CPAN安装GD,它也错误的给出下面的错误开始在“结果:失败”。(3)
奇怪的是,我的电脑识别出我安装了GD,因为当我调用gdlib-config --all时,它会给我GD库的输出(4)。看起来GD可能在那里,但不知何故没有链接到Perl?我错过了一些超级简单的东西吗?任何帮助都将不胜感激。我为任何无知道歉,我仍然是一个使用终端的业余爱好者。
我也试过perlbrew,得到了同样的点和同样的错误。
Circos和Perl都在我的路径中(如下所示)。
(一)
Mon Jun 14 ashleyschumann ~circos
*** REQUIRED MODULE(S) MISSING OR OUT-OF-DATE ***
You are missing one or more Perl modules, require newer versions, or some modules failed to load. Use CPAN to install it as described in this tutorial
http://www.circos.ca/documentation/tutorials/configuration/perl_and_modules
missing GD::Polyline
error Attempt to reload GD.pm aborted.Compilation failed in require at /Users/ashleyschumann/perl5/lib/perl5/darwin-2level/GD/Polyline.pm line 45.
missing GD
error Can't load '/Users/ashleyschumann/perl5/lib/perl5/darwin-2level/auto/GD/GD.bundle' for module GD: dlopen(/Users/ashleyschumann/perl5/lib/perl5/darwin-2level/auto/GD/GD.bundle, 1): Library not loaded: /usr/local/opt/libpng/lib/libpng16.16.dylib Referenced from: /usr/local/opt/freetype/lib/libfreetype.6.dylib Reason: Incompatible library version: libfreetype.6.dylib requires version 54.0.0 or later, but libpng16.16.dylib provides version 31.0.0 at /Users/ashleyschumann/perl5/perlbrew/perls/perl-5.34.0/lib/5.34.0/darwin-2level/DynaLoader.pm line 197. at (eval 42) line 1.Compilation failed in require at (eval 42) line 1.
(二)
Mon Jun 14 ashleyschumann ~circos -modules
ok 1.52 Carp
ok 0.45 Clone
ok 2.63 Config::General
ok 3.80 Cwd
ok 2.179 Data::Dumper
ok 2.58 Digest::MD5
ok 2.85 File::Basename
ok 3.80 File::Spec::Functions
ok 0.2311 File::Temp
ok 1.52 FindBin
ok 0.39 Font::TTF::Font
missing GD
missing GD::Polyline
ok 2.52 Getopt::Long
ok 1.46 IO::File
ok 0.430 List::MoreUtils
ok 1.55 List::Util
ok 0.01 Math::Bezier
ok 1.999818 Math::BigFloat
ok 0.07 Math::Round
ok 0.08 Math::VecStat
ok 1.03_01 Memoize
ok 1.97 POSIX
ok 1.30 Params::Validate
ok 2.01 Pod::Usage
ok 2.05 Readonly
ok 2017060201 Regexp::Common
ok 2.86 SVG
ok 1.19 Set::IntSpan
ok 1.6611 Statistics::Basic
ok 3.23 Storable
ok 1.23 Sys::Hostname
ok 2.04 Text::Balanced
ok 0.62 Text::Format
ok 1.9767 Time::HiRes
(三)
Test Summary Report
-------------------
t/fork.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/GD.t (Wstat: 9 Tests: 2 Failed: 2)
Failed tests: 1-2
Non-zero wait status: 9
Parse errors: Bad plan. You planned 14 tests but ran 2.
t/HSV.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: Bad plan. You planned 1 tests but ran 0.
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.
t/transp.t (Wstat: 6400 Tests: 1 Failed: 1)
Failed test: 1
Non-zero exit status: 25
Parse errors: Bad plan. You planned 12 tests but ran 1.
Files=9, Tests=3, 152 wallclock secs ( 0.05 usr 0.03 sys + 106.75 cusr 19.56 csys = 126.39 CPU)
Result: FAIL
Failed 5/9 test programs. 3/3 subtests failed.
make: *** [Makefile:1157: test_dynamic] Error 255
RURBAN/GD-2.73.tar.gz
/Users/ashleyschumann/opt/anaconda3/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports RURBAN/GD-2.73.tar.gz
Failed during this command:
RURBAN/GD-2.73.tar.gz : make_test NO
(4)
Mon Jun 14 ashleyschumann ~/circos-0.69-9/GD-2.51gdlib-config --all
GD library 2.1.0
includedir: /usr/local/include
cflags: -I/usr/local/include
ldflags: -Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-rpath,/Users/ashleyschumann/opt/anaconda3/lib -L/Users/ashleyschumann/opt/anaconda3/lib -L/usr/X11/lib -L/usr/local/lib
libs: -ljpeg -lz -L/usr/local/lib -lpng16 -L/usr/local/opt/freetype/lib -lfreetype -L/usr/local/Cellar/fontconfig/2.13.1/lib -L/usr/local/opt/freetype/lib -lfontconfig -lfreetype -lfontconfig -L/usr/local/Cellar/libtiff/4.2.0/lib -ltiff -liconv
libdir: /usr/local/lib
features: GD_TIFF GD_JPEG GD_FONTCONFIG GD_FREETYPE GD_PNG GD_GIF GD_GIFANIM GD_OPENPOLYGON
路径
/Users/ashleyschumann/Applications/BLAST/ncbi-blast-2.11.0+:/Users/ashleyschumann/perl5/perlbrew/bin:/Users/ashleyschumann/perl5/perlbrew/perls/perl-5.34.0/bin:/Users/ashleyschumann/ashleyschumann/Applications/Circos/bin:/Library/Frameworks/Python.framework/Versions/3.8/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/anaconda3/bin:/Users/ashleyschumann/perl5/bin:/ashleyschumann/Applications/Circos/bin/libgd/libgd-2.2.3/config:/Users/ashleyschumann/current/bin:/usr/bin/perl:/Users/ashleyschumann/opt/anaconda3/bin:/Users/ashleyschumann/opt/anaconda3/condabin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/ashleyschumann/bin:/Users/ashleyschumann/Applications/circos/current/bin/circos:/Users/ashleyschumann/Applications/circos/bin:/dropbox/RAW_DATA
Upon running Håkon's suggestion, I got this error following the use of "make test
Tue Jun 15 ashleyschumann ~/GD-2.73make test
"/Users/ashleyschumann/perl5/perlbrew/perls/perl-5.34.0/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- GD.bs blib/arch/auto/GD/GD.bs 644
PERL_DL_NONLAZY=1 "/Users/ashleyschumann/perl5/perlbrew/perls/perl-5.34.0/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/fork.t .................. Can't load '/Users/ashleyschumann/GD-2.73/blib/arch/auto/GD/GD.bundle' for module GD: dlopen(/Users/ashleyschumann/GD-2.73/blib/arch/auto/GD/GD.bundle, 2): Library not loaded: /usr/local/opt/libpng/lib/libpng16.16.dylib
Referenced from: /usr/local/opt/freetype/lib/libfreetype.6.dylib
Reason: Incompatible library version: libfreetype.6.dylib requires version 54.0.0 or later, but libpng16.16.dylib provides version 31.0.0 at /Users/ashleyschumann/perl5/perlbrew/perls/perl-5.34.0/lib/5.34.0/darwin-2level/DynaLoader.pm line 197.
at /Users/ashleyschumann/GD-2.73/blib/lib/GD/Simple.pm line 160.
Compilation failed in require at /Users/ashleyschumann/GD-2.73/blib/lib/GD/Simple.pm line 160.
BEGIN failed--compilation aborted at /Users/ashleyschumann/GD-2.73/blib/lib/GD/Simple.pm line 160.
Compilation failed in require at t/fork.t line 3.
BEGIN failed--compilation aborted at t/fork.t line 3.
t/fork.t .................. Dubious, test returned 2 (wstat 512, 0x200)
No subtests run
t/GD.t .................... 1/14
# Failed test 'use GD;'
# at t/GD.t line 14.
# Tried to use 'GD'.
# Error: Can't load '/Users/ashleyschumann/GD-2.73/t/../blib/arch/auto/GD/GD.bundle' for module GD: dlopen(/Users/ashleyschumann/GD-2.73/t/../blib/arch/auto/GD/GD.bundle, 2): Library not loaded: /usr/local/opt/libpng/lib/libpng16.16.dylib
# Referenced from: /usr/local/opt/freetype/lib/libfreetype.6.dylib
# Reason: Incompatible library version: libfreetype.6.dylib requires version 54.0.0 or later, but libpng16.16.dylib provides version 31.0.0 at /Users/ashleyschumann/perl5/perlbrew/perls/perl-5.34.0/lib/5.34.0/darwin-2level/DynaLoader.pm line 197.
# 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.
# Failed test 'use GD::Simple;'
# at t/GD.t line 15.
# Tried to use 'GD::Simple'.
# Error: Attempt to reload GD.pm aborted.
# Compilation failed in require at /Users/ashleyschumann/GD-2.73/t/../blib/lib/GD/Simple.pm line 160.
# BEGIN failed--compilation aborted at /Users/ashleyschumann/GD-2.73/t/../blib/lib/GD/Simple.pm line 160.
# Compilation failed in require at t/GD.t line 15.
# BEGIN failed--compilation aborted at t/GD.t line 15.
t/GD.t .................... Failed 14/14 subtests
t/HSV.t ................... Can't load '/Users/ashleyschumann/GD-2.73/blib/arch/auto/GD/GD.bundle' for module GD: dlopen(/Users/ashleyschumann/GD-2.73/blib/arch/auto/GD/GD.bundle, 2): Library not loaded: /usr/local/opt/libpng/lib/libpng16.16.dylib
Referenced from: /usr/local/opt/freetype/lib/libfreetype.6.dylib
Reason: Incompatible library version: libfreetype.6.dylib requires version 54.0.0 or later, but libpng16.16.dylib provides version 31.0.0 at /Users/ashleyschumann/perl5/perlbrew/perls/perl-5.34.0/lib/5.34.0/darwin-2level/DynaLoader.pm line 197.
at /Users/ashleyschumann/GD-2.73/blib/lib/GD/Simple.pm line 160.
Compilation failed in require at /Users/ashleyschumann/GD-2.73/blib/lib/GD/Simple.pm line 160.
BEGIN failed--compilation aborted at /Users/ashleyschumann/GD-2.73/blib/lib/GD/Simple.pm line 160.
Compilation failed in require at t/HSV.t line 14.
BEGIN failed--compilation aborted at t/HSV.t line 14.
# Looks like your test exited with 2 before it could output anything.
t/HSV.t ................... Dubious, test returned 2 (wstat 512, 0x200)
Failed 1/1 subtests
t/Polyline.t .............. Can't load '/Users/ashleyschumann/GD-2.73/blib/arch/auto/GD/GD.bundle' for module GD: dlopen(/Users/ashleyschumann/GD-2.73/blib/arch/auto/GD/GD.bundle, 2): Library not loaded: /usr/local/opt/libpng/lib/libpng16.16.dylib
Referenced from: /usr/local/opt/freetype/lib/libfreetype.6.dylib
Reason: Incompatible library version: libfreetype.6.dylib requires version 54.0.0 or later, but libpng16.16.dylib provides version 31.0.0 at /Users/ashleyschumann/perl5/perlbrew/perls/perl-5.34.0/lib/5.34.0/darwin-2level/DynaLoader.pm line 197.
at /Users/ashleyschumann/GD-2.73/blib/lib/GD/Polyline.pm line 45.
Compilation failed in require at /Users/ashleyschumann/GD-2.73/blib/lib/GD/Polyline.pm line 45.
BEGIN failed--compilation aborted at /Users/ashleyschumann/GD-2.73/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
t/transp.t ................ 1/12
# Failed test 'use GD;'
# at t/transp.t line 8.
# Tried to use 'GD'.
# Error: Can't load '/Users/ashleyschumann/GD-2.73/blib/arch/auto/GD/GD.bundle' for module GD: dlopen(/Users/ashleyschumann/GD-2.73/blib/arch/auto/GD/GD.bundle, 2): Library not loaded: /usr/local/opt/libpng/lib/libpng16.16.dylib
# Referenced from: /usr/local/opt/freetype/lib/libfreetype.6.dylib
# Reason: Incompatible library version: libfreetype.6.dylib requires version 54.0.0 or later, but libpng16.16.dylib provides version 31.0.0 at /Users/ashleyschumann/perl5/perlbrew/perls/perl-5.34.0/lib/5.34.0/darwin-2level/DynaLoader.pm line 197.
# at t/transp.t line 8.
# Compilation failed in require at t/transp.t line 8.
# BEGIN failed--compilation aborted at t/transp.t line 8.
Use of uninitialized value $pkg in concatenation (.) or string at /Users/ashleyschumann/perl5/perlbrew/perls/perl-5.34.0/lib/5.34.0/Symbol.pm line 131.
Can't locate object method "_newFromGif" via package "GD::Image" at /Users/ashleyschumann/GD-2.73/blib/lib/GD/Image.pm line 196.
# Looks like your test exited with 25 just after 1.
t/transp.t ................ Dubious, test returned 25 (wstat 6400, 0x1900)
Failed 12/12 subtests
t/z_kwalitee.t ............ skipped: No RELEASE_TESTING
t/z_manifest.t ............ skipped: requires a git checkout and a unix for git and diff
t/z_pod-spell-mistakes.t .. skipped: No RELEASE_TESTING
t/z_pod.t ................. skipped: No RELEASE_TESTING
Test Summary Report
-------------------
t/fork.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/GD.t (Wstat: 9 Tests: 2 Failed: 2)
Failed tests: 1-2
Non-zero wait status: 9
Parse errors: Bad plan. You planned 14 tests but ran 2.
t/HSV.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: Bad plan. You planned 1 tests but ran 0.
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.
t/transp.t (Wstat: 6400 Tests: 1 Failed: 1)
Failed test: 1
Non-zero exit status: 25
Parse errors: Bad plan. You planned 12 tests but ran 1.
Files=9, Tests=3, 163 wallclock secs ( 0.04 usr 0.03 sys + 106.76 cusr 20.47 csys = 127.30 CPU)
Result: FAIL
Failed 5/9 test programs. 3/3 subtests failed.
make: *** [Makefile:1157: test_dynamic] Error 255
(base) Tue Jun 15 ashleyschumann ~pkg-config --debug libpng
no output option set, defaulting to --exists
Error printing disabled by default due to use of output options --exists, --atleast/exact/max-version, --list-all or no output option at all. Value of --print-errors: 0
Error printing disabled
Adding virtual 'pkg-config' package to list of known packages
Looking for package 'libpng'
Looking for package 'libpng-uninstalled'
Reading 'libpng' from file '/usr/local/lib/pkgconfig/libpng.pc'
Parsing package file '/usr/local/lib/pkgconfig/libpng.pc'
line>prefix=/usr/local/Cellar/libpng/1.6.37
Variable declaration, 'prefix' has value '/usr/local/Cellar/libpng/1.6.37'
line>exec_prefix=${prefix}
Variable declaration, 'exec_prefix' has value '/usr/local/Cellar/libpng/1.6.37'
line>libdir=${exec_prefix}/lib
Variable declaration, 'libdir' has value '/usr/local/Cellar/libpng/1.6.37/lib'
line>includedir=${prefix}/include/libpng16
Variable declaration, 'includedir' has value '/usr/local/Cellar/libpng/1.6.37/include/libpng16'
line>
line>Name: libpng
line>Description: Loads and saves PNG files
line>Version: 1.6.37
line>Requires: zlib
line>Libs: -L${libdir} -lpng16
line>Libs.private: -lz
Unknown keyword 'Libs.private' in '/usr/local/lib/pkgconfig/libpng.pc'
line>Cflags: -I${includedir}
Path position of 'libpng' is 1
Adding 'libpng' to list of known packages
Searching for 'libpng' requirement 'zlib'
Looking for package 'zlib'
Looking for package 'zlib-uninstalled'
Reading 'zlib' from file '/usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig/10.15/zlib.pc'
Parsing package file '/usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig/10.15/zlib.pc'
line>homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk
Variable declaration, 'homebrew_sdkroot' has value '/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk'
line>prefix=${homebrew_sdkroot}/usr
Variable declaration, 'prefix' has value '/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr'
line>exec_prefix=/usr
Variable declaration, 'exec_prefix' has value '/usr'
line>libdir=${exec_prefix}/lib
Variable declaration, 'libdir' has value '/usr/lib'
line>sharedlibdir=${libdir}
Variable declaration, 'sharedlibdir' has value '/usr/lib'
line>includedir=${prefix}/include
Variable declaration, 'includedir' has value '/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include'
line>
line>Name: zlib
line>Description: zlib compression library
line>Version: 1.2.11
line>
line>Requires:
line>Libs: -L${libdir} -L${sharedlibdir} -lz
line>Cflags:
Path position of 'zlib' is 4
Adding 'zlib' to list of known packages
Package zlib has -L /usr/lib in Libs
Removing -L /usr/lib from libs for zlib
Package zlib has -L /usr/lib in Libs
Removing -L /usr/lib from libs for zlib
~ ~ ~
/Users/ashleyschumann/GD-2.73/blib/arch/auto/GD/GD.bundle:
/usr/local/lib/libjpeg.9.dylib (compatibility version 10.0.0, current version 10.0.0)
@rpath/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
/usr/local/lib/libpng16.16.dylib (compatibility version 31.0.0, current version 31.0.0)
/usr/local/opt/freetype/lib/libfreetype.6.dylib (compatibility version 24.0.0, current version 24.4.0)
/usr/local/opt/fontconfig/lib/libfontconfig.1.dylib (compatibility version 14.0.0, current version 14.0.0)
/usr/local/opt/libtiff/lib/libtiff.5.dylib (compatibility version 12.0.0, current version 12.0.0)
@rpath/libiconv.2.dylib (compatibility version 9.0.0, current version 9.1.0)
/usr/local/lib/libgd.3.dylib (compatibility version 4.0.0, current version 4.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.100.1)
1条答案
按热度按时间q35jwt9p1#
对于什么是值得的.我也有GD安装Circos在Mac的麻烦.当使用circos我得到这个错误消息:
Circos错误True Type字体支持有问题。Circos无法从字体文件中呈现文本.请检查gd(系统图形库)和GD(Perl的gd接口)是否使用True Type支持编译。
所以我再次用自制程序编译了GD,但是:
用自制软件重新安装GD,
brew link --overwrite gd
检查
酿造表|grep gd
brew info libgd
testing(我关闭并重新打开了终端,以防万一)。
cd circos-0.69-9
Perl bin/gddiag
现在它工作了:分配了20603种颜色在gddiag.png GD版本2.78中创建了彩色诊断图像