Problem when install GD module-解决

Problem when install GD module-解决

About the GD installation :

I have tried for many times for GD installation:
1. install zlib and libpng;
2. then cd GD module (which have been dowload and unzip) and type
  $ perl makefile.pl
  $ make
  $ su
  $ password:
  $ make install
   
The make install log as :
gcc -c  -I/home/user/programs/PerlMol/mycompile/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/include -I/usr/include -I/usr/include/gd -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -march=i386 -mcpu=i686   -DVERSION=\"2.35\" -DXS_VERSION=\"2.35\" -fPIC "-I/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE"  -DHAVE_JPEG -DHAVE_FT -DHAVE_XPM -DHAVE_GIF -DHAVE_PNG -DHAVE_ANIMGIF GD.c
GD.xs: In function `newDynamicCtx':
GD.xs:444: structure has no member named `gd_free'
GD.xs: In function `gd_cloneDim':
GD.xs:464: structure has no member named `alpha'
GD.xs:464: structure has no member named `alpha'
GD.xs:470: structure has no member named `thick'
GD.xs:470: structure has no member named `thick'
GD.xs: In function `XS_GD__Image_newFromPngData':
GD.xs:640: structure has no member named `gd_free'
GD.xs: In function `XS_GD__Image_newFromJpegData':
GD.xs:696: structure has no member named `gd_free'
GD.xs: In function `XS_GD__Image_newFromWBMPData':
GD.xs:723: structure has no member named `gd_free'
GD.xs: In function `XS_GD__Image__newFromGif':
GD.xs:855: warning: assignment makes pointer from integer without a cast


3. after the installation, I tried to run one scrip which use GD::Graph, it always failed with the log  run.log

Can't locate GD.pm in @INC (@INC contains: /home/user/programs/PerlMol/mycompile/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /home/userprograms/PerlMol/mycompile/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .) at /usr/lib/perl5/site_perl/5.8.0/GD/Graph.pm line 38.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.0/GD/Graph.pm line 38.
Compilation failed in require at /usr/lib/perl5/site_perl/5.8.0/GD/Graph/axestype.pm line 18.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.0/GD/Graph/axestype.pm line 18.
Compilation failed in require at /usr/lib/perl5/site_perl/5.8.0/GD/Graph/bars.pm line 18.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.0/GD/Graph/bars.pm line 18.
Compilation failed in require at statistic_chart.pl line 133.
BEGIN failed--compilation aborted at statistic_chart.pl line 133.


What is matter? I am a beginner and will be very appriciated for  any respond

Thanks!

cd GD-2.XX/demos
perl shapes.pl | display -
Can't locate GD.pm in @INC (@INC contains: /home/user/programs/PerlMol/mycompile/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /home/user/programs/PerlMol/mycompile/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .) at shapes.pl line 3.

I am confused where have the module been installed
or  it never been installed in fact.
因为你没装上  呵呵

安装的原则是要先安装gd的开发包, 比如在redhat上是gd-devel-...   其他系统上可能有区别

多谢提醒!可什么是GD-level? 能否详细点?还需要安装其他的什么东西吗?

只前装了 zlib & libpng

---因为不懂,所以愚昧---
http://linux.chinaunix.net/bbs/r ... amp;goto=nextnewset刚看到这个好贴,继续学习

多谢!欢迎更多指导
还有另外一个联接:http://www.im286.net/index.php/u ... wspace-itemid-33562

基本明白

---勇于尝试,力取成功---
http://www.im286.net/index.php/u ... wspace-itemid-33562
上面应为http://www.im286.net/index.php/u ... wspace-itemid-33562
rpm -ivh gd-devel-1.8.4-11.i386.rpm
warning: gd-devel-1.8.4-11.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing...                ########################################### [100%]
        package gd-devel-1.8.4-12 (which is newer than gd-devel-1.8.4-11) is already installed
        file /usr/lib/libgd.a from install of gd-devel-1.8.4-11 conflicts with file from package gd-devel-1.8.4-12

what is mean of the above? Does it mean gd-devel-1.8.4-12 have been already? But why I coudn't find it ?

  where is it?
很不幸, 你已经装了那个gd-devel,
既然你用rpm

找找下面列表中合适的rpm装一下吧
yum search gd |grep perl
perl-GDGraph.noarch                      1.4308-1.fc6           fedora
perl-GDGraph

perl-Font-TTF.noarch                     0.40.0-3.fc7           fedora
perl-GD-SVG.noarch                       0.28-1.fc7             fedora
perl-GD-SVG
perl-GDGraph3d.noarch                    0.63-6.fc6             fedora
perl-GDGraph3d
perl-Crypt-Random.noarch                 1.25-3.fc7             fedora
perl-Template-GD.noarch                  2.66-2.fc7             fedora
perl-Template-GD
perl-GD.i386                             2.35-2.fc6             fedora
perl-GDTextUtil.noarch                   0.86-8.fc6             fedora
perl-GDTextUtil
perl-GDGraph.noarch                      1:1.44-2.fc7           updates
perl-GDGraph