[3rd-Party Apps] 尝试cpan Image::Magick但是失败
Tofloor
poster avatar
秋胜春朝
deepin
2023-12-02 20:34
Author

想通过sd2xc-2.5.pl打包鼠标指针主题,但提示

Can't locate Image/Magick.pm in @INC (you may need to install the Image::Magick module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.32.1 /usr/local/share/perl/5.32.1 /usr/lib/x86_64-linux-gnu/perl5/5.32 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.32 /usr/share/perl/5.32 /usr/local/lib/site_perl) at ./104659-sd2xc-2.5.pl line 131.
BEGIN failed--compilation aborted at ./104659-sd2xc-2.5.pl line 131.

于是尝试sudo cpan Image::Magick,结果安装失败。报错如下:

JASON@JASON-PC:~/Desktop$ cpan install Image::Magick
Loading internal logger. Log::Log4perl recommended for better logging Running install for module 'Image::Magick'
Checksum for /home/JASON/.cpan/sources/authors/id/J/JC/JCRISTY/Image-Magick-7.1.1-20.tar.gz ok
'YAML' not installed, will not store persistent state
Configuring J/JC/JCRISTY/Image-Magick-7.1.1-20.tar.gz with Makefile.PL
Have /usr/lib/x86_64-linux-gnu/perl-base
Want /usr/lib/x86_64-linux-gnu/perl/5.32
Your perl and your Config.pm seem to have different ideas about the
architecture they are running on.
Perl thinks: [perl-base]
Config says: [x86_64-linux-gnu-thread-multi]
This may or may not cause problems. Please check your installation of perl
if you have problems building this extension.
Warning (mostly harmless): No library found for -lMagickCore-7.Q16HDRI
Generating a Unix-style Makefile
Writing Makefile for Image::Magick /usr/bin/perl Makefile.PL INSTALLDIRS=site -- OK
Running make for J/JC/JCRISTY/Image-Magick-7.1.1-20.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"
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Magick.bs blib/arch/auto/Image/Magick/Magick.bs 644
"/usr/bin/perl" "/usr/local/share/perl/5.32.1/ExtUtils/xsubpp" -typemap '/usr/share/perl/5.32/ExtUtils/typemap' -typemap '/home/JASON/.cpan/build/Image-Magick-7.1.1-7/typemap' Magick.xs > Magick.xsc
mv Magick.xsc Magick.c
x86_64-linux-gnu-gcc -c -I/usr/local/include/ImageMagick-7 -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/libxml2 -I"/usr/include/ImageMagick-7" -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -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 -g -DVERSION="7.1.1" -DXS_VERSION="7.1.1" -fPIC "-I/usr/lib/x86_64-linux-gnu/perl/5.32/CORE" -D_LARGE_FILES=1 -DHAVE_CONFIG_H Magick.c
Magick.xs:56:10: fatal error: MagickCore/MagickCore.h: 没有那个文件或目录
56 | #include
| ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:351:Magick.o] 错误 1
JCRISTY/Image-Magick-7.1.1-20.tar.gz
/usr/bin/make -- NOT OK

请问一下如何解决该问题?谢谢!

系统环境:deepinv23 beta2

Reply Favorite View the author
All Replies
neko
deepin
Ecological co-builder
2023-12-02 20:51
#1

没安装Magick开发库吧

Reply View the author
Ziggy
deepin
2023-12-02 23:20
#2

Magick.xs:56:10: fatal error: MagickCore/MagickCore.h: 没有那个文件或目录

apt-file search MagickCore/MagickCore.h看看这个头文件在哪个包里

Reply View the author
秋胜春朝
deepin
2023-12-03 19:19
#3
Ziggy

Magick.xs:56:10: fatal error: MagickCore/MagickCore.h: 没有那个文件或目录

apt-file search MagickCore/MagickCore.h看看这个头文件在哪个包里

libmagickcore-6-headers: /usr/include/ImageMagick-6/magick/MagickCore.h

Reply View the author
秋胜春朝
deepin
2023-12-05 05:07
#4
Ziggy

Magick.xs:56:10: fatal error: MagickCore/MagickCore.h: 没有那个文件或目录

apt-file search MagickCore/MagickCore.h看看这个头文件在哪个包里

我现在已知这个头文件在哪个包里,请问一下我接下来如何操作来解决这个问题?谢谢!

Reply View the author
Ziggy
deepin
2023-12-05 06:27
#5
秋胜春朝

我现在已知这个头文件在哪个包里,请问一下我接下来如何操作来解决这个问题?谢谢!

安装这个包即可,如果有其他类似not found报错,都可以按照这个方法来找

如果确实找不出来,可能是源里的某个库不兼容了,或新或旧都会导致编译的时候找不到符合的文件或者符号

Reply View the author
秋胜春朝
deepin
2023-12-10 01:55
#6
Ziggy

安装这个包即可,如果有其他类似not found报错,都可以按照这个方法来找

如果确实找不出来,可能是源里的某个库不兼容了,或新或旧都会导致编译的时候找不到符合的文件或者符号

image.png

执行后还是报错

Reply View the author