首页 > 解决方案 > 在 Mac OS Big Sur 版本 11.0.1 上安装 circos 时缺少 GD

问题描述

我发现在 MacOS 上安装 circos 非常非常困难,而且我在 Google 上找到的所有答案都非常生疏,并且不适用于 Mac OS Big Sur 11.0.1 版。以下是我所缺少的:

(base) user@user-MacBook-Pro % circos -modules
ok       1.50 Carp
ok       0.45 Clone
ok       2.63 Config::General
ok       3.74 Cwd
ok      2.170 Data::Dumper
ok       2.55 Digest::MD5
ok       2.85 File::Basename
ok       3.74 File::Spec::Functions
ok     0.2304 File::Temp
ok       1.51 FindBin
ok       0.39 Font::TTF::Font
missing            GD
missing            GD::Polyline
ok        2.5 Getopt::Long
ok       1.39 IO::File
ok      0.430 List::MoreUtils
ok        1.5 List::Util
ok       0.01 Math::Bezier
ok   1.999811 Math::BigFloat
ok       0.07 Math::Round
ok       0.08 Math::VecStat
ok    1.03_01 Memoize
ok       1.84 POSIX
ok       1.30 Params::Validate
ok       1.69 Pod::Usage
ok       2.05 Readonly
ok 2017060201 Regexp::Common
ok       2.85 SVG
ok       1.19 Set::IntSpan
ok     1.6611 Statistics::Basic
ok    3.08_01 Storable
ok       1.22 Sys::Hostname
ok       2.03 Text::Balanced
ok       0.62 Text::Format
ok     1.9759 Time::HiRes

似乎唯一缺少的包是GD. 所以我尝试安装GD。

(base) user@user-MacBook-Pro % curl -O http://www.cpan.org/authors/id/L/LD/LDS/GD-2.50.tar.gz
(base) user@user-MacBook-Pro % tar xvfz GD-2.50.tar.gz
(base) user@user-MacBook-Pro % cd GD-2.50
(base) user@user-MacBook-Pro % perl Makefile.pl
Notice: Type perl Makefile.PL -h for command-line option summary.

**UNRECOVERABLE ERROR**
Could not find gdlib-config in the search path. Please install libgd 2.0.28 or higher.
If you want to try to compile anyway, please rerun this script with the option --ignore_missing_gd.

再次,似乎问题丢失了libgd。所以我尝试安装它:

(base) user@user-MacBook-Pro curl -O https://bitbucket.org/libgd/gd-libgd/downloads/libgd-2.1.0-rc2.tar.gz
(base) user@user-MacBook-Pro tar -xzvf libgd-2.1.0-rc2.tar.gz
(base) user@user-MacBook-Pro cd libgd-2.1.0-rc2
(base) user@user-MacBook-Pro ./configure
(base) user@user-MacBook-Pro make 
(base) user@user-MacBook-Pro sudo make install
........
Making install in config
 ../config/install-sh -c -d '/usr/local/bin'
 /usr/bin/install -c gdlib-config '/usr/local/bin'
 ../config/install-sh -c -d '/usr/local/lib/pkgconfig'
 /usr/bin/install -c -m 644 gdlib.pc '/usr/local/lib/pkgconfig'
Making install in tests
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.

它仍然对我不起作用。任何建议,将不胜感激。

谢谢,苗

标签: macosperlgdcircos

解决方案


以下对我有用。我正在使用perlbrew版本perl5.30.1、macOS 11.0.1。

$ brew install pkg-config
$ brew install libgd
$ cpanm GD

推荐阅读