安装GD-2.18用perl安装时报错在安装perl的模块时候,出现这个错误:Can't locate ExtUtils/MakeMaker.pm in @INC解决方法如下:cd /rootwget http://files.directadmin.com/services/9.0/ExtUtils-MakeMaker-6.31.tar.gztar xvzf ExtUtils-MakeMaker-6.31.tar.gzcd ExtUtils-MakeMaker-6.31perl Makefile.PLmakemake install
报错:
[root GD-2.18]# perl Makefile.PL LIB=/home/fred/lib
Can't locate ExtUtils/MakeMaker.pm in ( contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at Makefile.PL line 1.
BEGIN failed--compilation aborted at Makefile.PL line 1.
[root ExtUtils-MakeMaker-6.31]# yum install perl-ExtUtils-MakeMaker
安装 GD-2.18
[root GD-2.18]# perl Makefile.PL LIB=/home/fred/lib
Configuring for libgd version 2.0.34.
Included Features: GD_XPM GD_JPEG GD_FONTCONFIG GD_FREETYPE GD_PNG GD_GIF GD_GIFANIM GD_OPENPOLYGON GD_UNCLOSEDPOLY GD_ANIMGIF
GD library used from: /usr
If you experience compile problems, please check the @INC, @LIBPATH and @LIBS
arrays defined in Makefile.PL and manually adjust, if necessary.
Checking if your kit is complete...
Looks good
Writing Makefile for GD
[root@ubuntu GD-2.18]# make
cp GD/Polyline.pm blib/lib/GD/Polyline.pm
cp qd.pl blib/lib/qd.pl
cp GD.pm blib/lib/GD.pm
AutoSplitting blib/lib/GD.pm (blib/lib/auto/GD)
cp GD/Simple.pm blib/lib/GD/Simple.pm
/usr/bin/perl /usr/share/perl5/vendor_perl/ExtUtils/xsubpp -typemap /usr/share/perl5/ExtUtils/typemap -typemap typemap GD.xs > GD.xsc && mv GD.xsc GD.c
gcc -c -I/usr/include -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -DVERSION=\"2.18\" -DXS_VERSION=\"2.18\" -fPIC "-I/usr/lib64/perl5/CORE" -DHAVE_JPEG -DHAVE_FT -DHAVE_XPM -DHAVE_GIF -DHAVE_ANIMGIF -DHAVE_UNCLOSEDPOLY -DHAVE_FONTCONFIG GD.c
GD.xs: In function ?.onstant?.
GD.xs:331:1: warning: label ?.ot_there?.defined but not used [-Wunused-label]
not_there:
^
GD.c: In function ?.S_GD__Image_trueColor?.
GD.c:696:9: warning: variable ?.ackname?.set but not used [-Wunused-but-set-variable]
char * packname;
^
GD.c: In function ?.S_GD__Image__new?.
GD.c:729:9: warning: variable ?.ackname?.set but not used [-Wunused-but-set-variable]
char * packname;
^
GD.c: In function ?.S_GD__Image__newFromPng?.
GD.c:784:9: warning: variable ?.ackname?.set but not used [-Wunused-but-set-variable]
char * packname;
^
GD.c: In function ?.S_GD__Image_newFromPngData?.
GD.c:817:9: warning: variable ?.ackname?.set but not used [-Wunused-but-set-variable]
char * packname;
^
GD.c: In function ?.S_GD__Image_newFromGdData?.
GD.c:856:9: warning: variable ?.ackname?.set but not used [-Wunused-but-set-variable]
char * packname;
^
GD.c: In function ?.S_GD__Image_newFromGd2Data?.
GD.c:892:9: warning: variable ?.ackname?.set but not used [-Wunused-but-set-variable]
char * packname;
^
GD.c: In function ?.S_GD__Image_newFromJpegData?.
GD.xs:644:8: warning: unused variable ?.rrormsg?.[-Wunused-variable]
SV* errormsg;
^
GD.c:928:9: warning: variable ?.ackname?.set but not used [-Wunused-but-set-variable]
char * packname;
^
GD.c: In function ?.S_GD__Image_newFromWBMPData?.
GD.c:974:9: warning: variable ?.ackname?.set but not used [-Wunused-but-set-variable]
char * packname;
^
GD.c: In function ?.S_GD__Image__newFromXbm?.
GD.c:1013:9: warning: variable ?.ackname?.set but not used [-Wunused-but-set-variable]
char * packname;
^
GD.c: In function ?.S_GD__Image__newFromGd?.
GD.c:1041:9: warning: variable ?.ackname?.set but not used [-Wunused-but-set-variable]
char * packname;
^
GD.c: In function ?.S_GD__Image__newFromGd2?.
GD.c:1069:9: warning: variable ?.ackname?.set but not used [-Wunused-but-set-variable]
char * packname;
^
GD.c: In function ?.S_GD__Image__newFromJpeg?.
GD.c:1097:9: warning: variable ?.ackname?.set but not used [-Wunused-but-set-variable]
char * packname;
^
GD.c: In function ?.S_GD__Image__newFromWBMP?.
GD.c:1145:9: warning: variable ?.ackname?.set but not used [-Wunused-but-set-variable]
char * packname;
^
GD.c: In function ?.S_GD__Image_newFromXpm?.
GD.c:1184:9: warning: variable ?.ackname?.set but not used [-Wunused-but-set-variable]
char * packname;
^
GD.c: In function ?.S_GD__Image__newFromGd2Part?.
GD.c:1229:9: warning: variable ?.ackname?.set but not used [-Wunused-but-set-variable]
char * packname;
^
GD.c: In function ?.S_GD__Image__newFromGif?.
GD.c:1265:9: warning: variable ?.ackname?.set but not used [-Wunused-but-set-variable]
char * packname;
^
GD.c: In function ?.S_GD__Image_newFromGifData?.
GD.xs:839:8: warning: unused variable ?.rrormsg?.[-Wunused-variable]
SV* errormsg;
^
GD.c:1313:9: warning: variable ?.ackname?.set but not used [-Wunused-but-set-variable]
char * packname;
^
GD.c: In function ?.S_GD__Image_gifanimbegin?.
GD.xs:924:7: warning: unused variable ?.rrormsg?.[-Wunused-variable]
SV* errormsg;
^
GD.c: In function ?.S_GD__Image_gifanimend?.
GD.c:1638:12: warning: variable ?.mage?.set but not used [-Wunused-but-set-variable]
GD__Image image;
^
GD.c: In function ?.S_GD__Image_colorClosestAlpha?.
GD.c:3388:6: warning: unused variable ?.?.[-Wunused-variable]
int a = (int)SvIV(ST(4))
^
GD.xs: In function ?.S_GD__Image_stringFT?.
GD.xs:2107:6: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
if (value = hv_fetch(hash,"linespacing",strlen("linespacing"),0)) {
^
GD.xs:2111:6: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
if (value = hv_fetch(hash,"charmap",strlen("charmap"),0)) {
^
GD.xs:2124:13: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
if (value = hv_fetch(hash,"resolution",strlen("resolution"),0)) {
^
GD.xs:2132:13: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
if (value = hv_fetch(hash,"kerning",strlen("kerning"),0)) {
^
GD.c: In function ?.S_GD__Image_useFontConfig?.
GD.xs:2207:10: warning: unused variable ?.rrormsg?.[-Wunused-variable]
SV* errormsg;
^
GD.c:4435:12: warning: variable ?.mage?.set but not used [-Wunused-but-set-variable]
GD__Image image;
^
GD.c: In function ?.S_GD__Font_load?.
GD.c:4651:9: warning: variable ?.ackname?.set but not used [-Wunused-but-set-variable]
char * packname;
^
GD.c: In function ?.S_GD__Font_Small?.
GD.c:4763:9: warning: variable ?.ackname?.set but not used [-Wunused-but-set-variable]
char * packname;
^
GD.c: In function ?.S_GD__Font_Large?.
GD.c:4791:9: warning: variable ?.ackname?.set but not used [-Wunused-but-set-variable]
char * packname;
^
GD.c: In function ?.S_GD__Font_Giant?.
GD.c:4819:9: warning: variable ?.ackname?.set but not used [-Wunused-but-set-variable]
char * packname;
^
GD.c: In function ?.S_GD__Font_MediumBold?.
GD.c:4847:9: warning: variable ?.ackname?.set but not used [-Wunused-but-set-variable]
char * packname;
^
GD.c: In function ?.S_GD__Font_Tiny?.
GD.c:4875:9: warning: variable ?.ackname?.set but not used [-Wunused-but-set-variable]
char * packname;
^
GD.c: At top level:
GD.xs:55:1: warning: ?.ot_here?.defined but not used [-Wunused-function]
not_here(char *s)
^
Running Mkbootstrap for GD ()
chmod 644 GD.bs
rm -f blib/arch/auto/GD/GD.so
gcc -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wl,-z,relro GD.o -o blib/arch/auto/GD/GD.so \
-L/usr/lib64 -L/usr/lib64 -L/usr/lib64 -L/usr/lib64 -lXpm -lX11 -ljpeg -lfontconfig -lfreetype -lpng -lz -lm -lgd \
chmod 755 blib/arch/auto/GD/GD.so
cp GD.bs blib/arch/auto/GD/GD.bs
chmod 644 blib/arch/auto/GD/GD.bs
/usr/bin/perl "-Iblib/arch" "-Iblib/lib" bdf_scripts/bdf2gdfont.PLS 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 blib/man1/bdf2gdfont.pl.1
Manifying blib/man3/GD::Polyline.3pm
Manifying blib/man3/GD::Simple.3pm
Manifying blib/man3/GD.3pm
[root@ubuntu GD-2.18]# make install
Manifying blib/man1/bdf2gdfont.pl.1
Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
Installing /home/fred/lib/x86_64-linux-thread-multi/auto/GD/GD.so
Installing /home/fred/lib/x86_64-linux-thread-multi/auto/GD/GD.bs
Installing /home/fred/lib/x86_64-linux-thread-multi/GD.pm
Installing /home/fred/lib/x86_64-linux-thread-multi/qd.pl
Installing /home/fred/lib/x86_64-linux-thread-multi/GD/Polyline.pm
Installing /home/fred/lib/x86_64-linux-thread-multi/GD/Simple.pm
Installing /home/fred/lib/x86_64-linux-thread-multi/auto/GD/autosplit.ix
Installing /usr/local/share/man/man1/bdf2gdfont.pl.1
Installing /usr/local/share/man/man3/GD.3pm
Installing /usr/local/share/man/man3/GD::Simple.3pm
Installing /usr/local/share/man/man3/GD::Polyline.3pm
Installing /usr/local/bin/bdf2gdfont.pl
Appending installation info to /home/fred/lib/x86_64-linux-thread-multi/perllocal.pod