我正在尝试为 perlbrew 安装 imagemagick,因为应用程序需要比我的 ubuntu 自带的更高版本的 perl,并且此应用程序也需要使用 imagemagick。
我在 ubuntu jammy 上,并且我在 perlbrew 中使用了强调文本 perl 5.36.3。
当我尝试使用 perlbrew 安装 imagemagick 时,出现此错误:
cpan[1]> install Image::Magick
Reading '/home/me/.cpan/Metadata'
Database was generated on Thu, 09 Jan 2025 03:17:02 GMT
Running install for module 'Image::Magick'
Checksum for /home/me/.cpan/sources/authors/id/J/JC/JCRISTY/Image-Magick-7.1.1-28.tar.gz ok
Scanning cache /home/me/.cpan/build for sizes
............................................................................DONE
'YAML' not installed, will not store persistent state
Configuring J/JC/JCRISTY/Image-Magick-7.1.1-28.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Warning (mostly harmless): No library found for -lMagickCore-7.Q16HDRI
Generating a Unix-style Makefile
Writing Makefile for Image::Magick
Writing MYMETA.yml and MYMETA.json
JCRISTY/Image-Magick-7.1.1-28.tar.gz
/home/me/perl5/perlbrew/perls/perl-5.36.3/bin/perl Makefile.PL -- OK
Running make for J/JC/JCRISTY/Image-Magick-7.1.1-28.tar.gz
cp Magick.pm blib/lib/Image/Magick.pm
AutoSplitting blib/lib/Image/Magick.pm (blib/lib/auto/Image/Magick)
Running Mkbootstrap for Magick ()
chmod 644 "Magick.bs"
"/home/me/perl5/perlbrew/perls/perl-5.36.3/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Magick.bs blib/arch/auto/Image/Magick/Magick.bs 644
"/home/me/perl5/perlbrew/perls/perl-5.36.3/bin/perl" "/home/me/perl5/perlbrew/perls/perl-5.36.3/lib/5.36.3/ExtUtils/xsubpp" -typemap '/home/me/perl5/perlbrew/perls/perl-5.36.3/lib/5.36.3/ExtUtils/typemap' -typemap '/home/me/.cpan/build/Image-Magick-7.1.1-3/typemap' Magick.xs > Magick.xsc
mv Magick.xsc Magick.c
cc -c -I/usr/local/include/ImageMagick-7 -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/libxml2 -I"/usr/include/ImageMagick-7" -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/freetype2 -g -O2 -Wall -pthread -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -O2 -DVERSION=\"7.1.1\" -DXS_VERSION=\"7.1.1\" -fPIC "-I/home/me/perl5/perlbrew/perls/perl-5.36.3/lib/5.36.3/x86_64-linux/CORE" -D_LARGE_FILES=1 -DHAVE_CONFIG_H Magick.c
Magick.xs:56:10: fatal error: MagickCore/MagickCore.h: No such file or directory
56 | #include <MagickCore/MagickCore.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:351: Magick.o] Error 1
JCRISTY/Image-Magick-7.1.1-28.tar.gz
/usr/bin/make -- NOT OK
Failed during this command:
JCRISTY/Image-Magick-7.1.1-28.tar.gz : make NO