我用Ubuntu运行代码试图安装GD模块以使用circos
cpan -i GD
但出现以下错误
Reading '/root/.cpan/Metadata'
Database was generated on Tue, 23 Jul 2024 04:41:01 GMT
Running install for module 'GD'
Checksum for /root/.cpan/sources/authors/id/R/RU/RURBAN/GD-2.83.tar.gz ok
Configuring R/RU/RURBAN/GD-2.83.tar.gz with Makefile.PL
Configuring for libgd version 2.3.2.
/usr/local/lib/pkgconfig/gdlib.pc: Requires.private:
Included Features: GD_GIF GD_OPENPOLYGON GD_UNCLOSEDPOLY GD_FTCIRCLE VERSION_33 WINDOWS_BMP
GD library used from: /usr/local/lib
gdlib-config used from the PATH
External LIBS: -L/usr/local/lib -L/usr/local/lib64 -lgd
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for GD
Writing MYMETA.yml and MYMETA.json
RURBAN/GD-2.83.tar.gz
/usr/bin/perl Makefile.PL INSTALLDIRS=site -- OK
Running make for R/RU/RURBAN/GD-2.83.tar.gz
"/usr/bin/perl" lib/GD/Image_pm.PL lib/GD/Image.pm
Extracting Image.pm (with variable substitutions)
cp lib/GD.pm blib/lib/GD.pm
AutoSplitting blib/lib/GD.pm (blib/lib/auto/GD)
cp lib/GD/Simple.pm blib/lib/GD/Simple.pm
cp lib/GD/Polygon.pm blib/lib/GD/Polygon.pm
cp lib/GD/Polyline.pm blib/lib/GD/Polyline.pm
cp lib/GD/Image.pm blib/lib/GD/Image.pm
cp lib/GD/Group.pm blib/lib/GD/Group.pm
Running Mkbootstrap for GD ()
chmod 644 "GD.bs"
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- GD.bs blib/arch/auto/GD/GD.bs 644
"/usr/bin/perl" "/usr/share/perl/5.34/ExtUtils/xsubpp" -typemap '/usr/share/perl/5.34/ExtUtils/typemap' -typemap '/root/.cpan/build/GD-2.83-21/typemap' GD.xs > GD.xsc
mv GD.xsc GD.c
x86_64-linux-gnu-gcc -c -I/usr/local/include -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -Wextra -Wformat=1 -O2 -g -DVERSION=\"2.83\" -DXS_VERSION=\"2.83\" -fPIC "-I/usr/lib/x86_64-linux-gnu/perl/5.34/CORE" -DHAVE_WBMP -DHAVE_FT -DHAVE_GIF -DVERSION_33 -DHAVE_UNCLOSEDPOLY -DHAVE_FTCIRCLE -DHAVE_BMP -DLIBGD_VERSION="2.3.2" GD.c
rm -f blib/arch/auto/GD/GD.so
x86_64-linux-gnu-gcc -shared -L/usr/local/lib -fstack-protector-strong GD.o -o blib/arch/auto/GD/GD.so \
-L/usr/local/lib -lgd \
chmod 755 blib/arch/auto/GD/GD.so
"/usr/bin/perl" "-Iblib/arch" "-Iblib/lib" bdf_scripts/bdf2gdfont_pl.PL bdf_scripts/bdf2gdfont.pl
Extracting bdf2gdfont.pl (with variable substitutions)
cp bdf_scripts/bdf2gdfont.pl blib/script/bdf2gdfont.pl
"/usr/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/bdf2gdfont.pl
Manifying 1 pod document
Manifying 6 pod documents
RURBAN/GD-2.83.tar.gz
/usr/bin/make -- OK
The current configuration of allow_installing_outdated_dists is 'ask/no', but for this option we would need 'CPAN::DistnameInfo' installed. Please install 'CPAN::DistnameInfo' as soon as possible. As long as we are not equipped with 'CPAN::DistnameInfo' this option does not take effect
Running make test for RURBAN/GD-2.83.tar.gz
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- GD.bs blib/arch/auto/GD/GD.bs 644
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/autodetect.t ............ ok
t/caller.t ................ ok
t/fork.t .................. ok
t/GD.t .................... 1/15 # Testing gd 2.3.2 using png support.
# Failed test 'unable to generate comparison image for test 1 with png: Can't locate object method "newFromPng" via package "GD::Image" at (eval 17) line 1.
# '
# at t/GD.t line 271.
Can't locate object method "newFromPng" via package "GD::Image" at t/GD.t line 82.
# Looks like your test exited with 255 just after 3.
t/GD.t .................... Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 13/15 subtests
t/HSV.t ................... ok
t/Polyline.t .............. ok
t/transp.t ................ ok
t/windows_bmp.t ........... ok
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/GD.t (Wstat: 65280 Tests: 3 Failed: 1)
Failed test: 3
Non-zero exit status: 255
Parse errors: Bad plan. You planned 15 tests but ran 3.
Files=12, Tests=55, 1 wallclock secs ( 0.01 usr 0.07 sys + 0.67 cusr 0.12 csys = 0.87 CPU)
Result: FAIL
root@DESKTOP-3M0NMOI:/tmp/lib#
make: *** [Makefile:1137: test_dynamic] Error 255
RURBAN/GD-2.83.tar.gz
/usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports RURBAN/GD-2.83.tar.gz
似乎是libgd无法正常安装
以下是安装libgd后
Support for gd/gd2 images: yes
Support for Zlib: yes
Support for PNG library: yes
Support for JPEG library: yes
Support for WebP library: no
Support for HEIF library: no
Support for AVIF library: no
Support for TIFF library: no
Support for Freetype 2.x library: yes
Support for Fontconfig library: no
Support for Xpm library: no
Support for liq library: no
Support for complex text: no
Support for pthreads: yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating tests/Makefile
config.status: creating config/Makefile
config.status: creating config/gdlib.pc
config.status: creating src/config.h
config.status: src/config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
root@DESKTOP-3M0NMOI:/home/winger/libgd-2.3.2# make && make install
Making all in src
make[1]: Entering directory '/home/winger/libgd-2.3.2/src'
make all-am
make[2]: Entering directory '/home/winger/libgd-2.3.2/src'
make[2]: Leaving directory '/home/winger/libgd-2.3.2/src'
make[1]: Leaving directory '/home/winger/libgd-2.3.2/src'
Making all in config
make[1]: Entering directory '/home/winger/libgd-2.3.2/config'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/winger/libgd-2.3.2/config'
Making all in tests
make[1]: Entering directory '/home/winger/libgd-2.3.2/tests'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/winger/libgd-2.3.2/tests'
make[1]: Entering directory '/home/winger/libgd-2.3.2'
make[1]: Nothing to be done for 'all-am'.
make[1]: Leaving directory '/home/winger/libgd-2.3.2'
Making install in src
make[1]: Entering directory '/home/winger/libgd-2.3.2/src'
make[2]: Entering directory '/home/winger/libgd-2.3.2/src'
/usr/bin/mkdir -p '/tmp/lib'
/bin/bash ../libtool --mode=install /usr/bin/install -c libgd.la '/tmp/lib'
libtool: install: /usr/bin/install -c .libs/libgd.so.3.0.10 /tmp/lib/libgd.so.3.0.10
libtool: install: (cd /tmp/lib && { ln -s -f libgd.so.3.0.10 libgd.so.3 || { rm -f libgd.so.3 && ln -s libgd.so.3.0.10 libgd.so.3; }; })
libtool: install: (cd /tmp/lib && { ln -s -f libgd.so.3.0.10 libgd.so || { rm -f libgd.so && ln -s libgd.so.3.0.10 libgd.so; }; })
libtool: install: /usr/bin/install -c .libs/libgd.lai /tmp/lib/libgd.la
libtool: install: /usr/bin/install -c .libs/libgd.a /tmp/lib/libgd.a
libtool: install: chmod 644 /tmp/lib/libgd.a
libtool: install: ranlib /tmp/lib/libgd.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/sbin" ldconfig -n /tmp/lib
----------------------------------------------------------------------
Libraries have been installed in:
/tmp/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the 'LD_RUN_PATH' environment variable
during linking
- use the '-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to '/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
/usr/bin/mkdir -p '/tmp/bin'
/bin/bash ../libtool --mode=install /usr/bin/install -c gdcmpgif gdtopng pngtogd webpng gdparttopng gd2topng pngtogd2 annotate gd2copypal gd2togif giftogd2 '/tmp/bin'
libtool: install: /usr/bin/install -c .libs/gdcmpgif /tmp/bin/gdcmpgif
libtool: install: /usr/bin/install -c .libs/gdtopng /tmp/bin/gdtopng
libtool: install: /usr/bin/install -c .libs/pngtogd /tmp/bin/pngtogd
libtool: install: /usr/bin/install -c .libs/webpng /tmp/bin/webpng
libtool: install: /usr/bin/install -c .libs/gdparttopng /tmp/bin/gdparttopng
libtool: install: /usr/bin/install -c .libs/gd2topng /tmp/bin/gd2topng
libtool: install: /usr/bin/install -c .libs/pngtogd2 /tmp/bin/pngtogd2
libtool: install: /usr/bin/install -c .libs/annotate /tmp/bin/annotate
libtool: install: /usr/bin/install -c .libs/gd2copypal /tmp/bin/gd2copypal
libtool: install: /usr/bin/install -c .libs/gd2togif /tmp/bin/gd2togif
libtool: install: /usr/bin/install -c .libs/giftogd2 /tmp/bin/giftogd2
/usr/bin/mkdir -p '/tmp/bin'
/usr/bin/install -c bdftogd '/tmp/bin'
/usr/bin/mkdir -p '/tmp/include'
/usr/bin/install -c -m 644 gd.h gdfx.h gd_io.h gdcache.h gdfontg.h gdfontl.h gdfontmb.h gdfonts.h gdfontt.h entities.h gd_color_map.h gd_errors.h gdpp.h '/tmp/include'
make[2]: Leaving directory '/home/winger/libgd-2.3.2/src'
make[1]: Leaving directory '/home/winger/libgd-2.3.2/src'
Making install in config
make[1]: Entering directory '/home/winger/libgd-2.3.2/config'
make[2]: Entering directory '/home/winger/libgd-2.3.2/config'
make[2]: Nothing to be done for 'install-exec-am'.
/usr/bin/mkdir -p '/tmp/lib/pkgconfig'
/usr/bin/install -c -m 644 gdlib.pc '/tmp/lib/pkgconfig'
make[2]: Leaving directory '/home/winger/libgd-2.3.2/config'
make[1]: Leaving directory '/home/winger/libgd-2.3.2/config'
Making install in tests
make[1]: Entering directory '/home/winger/libgd-2.3.2/tests'
make[2]: Entering directory '/home/winger/libgd-2.3.2/tests'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/home/winger/libgd-2.3.2/tests'
make[1]: Leaving directory '/home/winger/libgd-2.3.2/tests'
make[1]: Entering directory '/home/winger/libgd-2.3.2'
make[2]: Entering directory '/home/winger/libgd-2.3.2'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/home/winger/libgd-2.3.2'
make[1]: Leaving directory '/home/winger/libgd-2.3.2'
试了网上的各种方法都无法解决,请问我应该怎么做?