Re: [問題]如何利用cpan來安裝GD繪圖模組!!!

看板Perl作者 (omusico)時間18年前 (2006/09/17 08:47), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串3/3 (看更多)
http://home.educities.edu.tw/kai2002/teach/activeperl/ 這有教學 ※ 引述《rockdan ( 凍結一切)》之銘言: : 最近讀了perl學習手札,裡面有教如何用cpan來下載 : perl模組,可能是我太笨了,學不會。所以想請教大 : 家。 : 我是在windows XP的系統下,安裝ActivePerl-5.8.7.815-MSWin32-x86-211909版本 : 在cpan安裝GD模組,MS-DOS顯示如下: : cpan> install GD : CPAN: Storable loaded ok : Going to read \.cpan\sources\authors\01mailrc.txt.gz : CPAN: Compress::Zlib loaded ok : CPAN: LWP::UserAgent loaded ok : Fetching with LWP: : ftp://cpan.cdpa.nsysu.edu.tw/Unix/Lang/CPAN/modules/02packages.details.txt.gz : Going to read \.cpan\sources\modules\02packages.details.txt.gz : Database was generated on Wed, 16 Aug 2006 21:32:34 GMT : There's a new CPAN.pm version (v1.87) available! : [Current version is v1.7601] : You might want to try : install Bundle::CPAN : reload cpan : without quitting the current session. It should be a seamless upgrade : while we are running... : Fetching with LWP: : ftp://cpan.cdpa.nsysu.edu.tw/Unix/Lang/CPAN/modules/03modlist.data.gz : Going to read \.cpan\sources\modules\03modlist.data.gz : Going to write \.cpan\Metadata : Running install for module GD : Running make for L/LD/LDS/GD-2.34.tar.gz : Fetching with LWP: : ftp://cpan.cdpa.nsysu.edu.tw/Unix/Lang/CPAN/authors/id/L/LD/LDS/GD-2.34.tar. : gz : CPAN: Digest::MD5 loaded ok : Fetching with LWP: : ftp://cpan.cdpa.nsysu.edu.tw/Unix/Lang/CPAN/authors/id/L/LD/LDS/CHECKSUMS : Checksum for \.cpan\sources\authors\id\L\LD\LDS\GD-2.34.tar.gz ok : Scanning cache \.cpan\build for sizes : CPAN: Archive::Tar loaded ok : GD-2.34/ : GD-2.34/t/ : GD-2.34/t/test.out.3.jpeg : GD-2.34/t/GD.t : GD-2.34/t/tile.jpeg : GD-2.34/t/test.out.4.jpeg : GD-2.34/t/test.out.5.jpeg : GD-2.34/t/test.out.6.jpeg : GD-2.34/t/test.out.7.jpeg : GD-2.34/t/test.out.8.jpeg : GD-2.34/t/test.out.9.jpeg : GD-2.34/t/test.out.3.png-1 : GD-2.34/t/Polyline.t : GD-2.34/t/test.out.4.png-1 : GD-2.34/t/test.out.4.png-2 : GD-2.34/t/test.out.10.png-1 : GD-2.34/t/test.out.10.png-2 : GD-2.34/t/test.out.10.png-3 : GD-2.34/t/test.out.1.png : GD-2.34/t/test.out.2.gif : GD-2.34/t/test.out.2.png : GD-2.34/t/test.out.3.gif : GD-2.34/t/test.out.3.png : GD-2.34/t/test.out.4.gif : GD-2.34/t/test.out.4.png : GD-2.34/t/test.out.5.gif : GD-2.34/t/test.out.5.png : GD-2.34/t/test.out.6.gif : GD-2.34/t/test.out.6.png : GD-2.34/t/test.out.7.gif : GD-2.34/t/test.out.7.png : GD-2.34/t/test.out.8.gif : GD-2.34/t/test.out.8.png : GD-2.34/t/test.out.9.gif : GD-2.34/t/test.out.9.png : GD-2.34/t/test.out.5.png-1 : GD-2.34/t/Generic.ttf : GD-2.34/t/test.out.6.png-1 : GD-2.34/t/test.out.7.png-1 : GD-2.34/t/frog.jpg : GD-2.34/t/frog.xpm : GD-2.34/t/test.out.10.jpeg : GD-2.34/t/test.out.8.png-1 : GD-2.34/t/test.out.8.png-2 : GD-2.34/t/test.out.8.png-3 : GD-2.34/t/test.out.8.png-4 : GD-2.34/t/test.out.8.png-5 : GD-2.34/t/test.out.8.png-6 : GD-2.34/t/tile.gif : GD-2.34/t/tile.png : GD-2.34/t/test.out.2.png-1 : GD-2.34/t/test.out.9.png-1 : GD-2.34/t/test.out.9.png-2 : GD-2.34/t/palettemap.png : GD-2.34/t/test.out.10.gif : GD-2.34/t/test.out.10.png : GD-2.34/t/test.out.2.jpeg : GD-2.34/GD/ : GD-2.34/GD/Polygon.pm : GD-2.34/GD/Simple.pm : GD-2.34/GD/Image.pm.PLS : GD-2.34/GD/Polyline.pm : GD-2.34/GD.pm : GD-2.34/GD.xs : GD-2.34/demos/ : GD-2.34/demos/brushes.pl : GD-2.34/demos/font_list.png : GD-2.34/demos/fonttest : GD-2.34/demos/polys.pl : GD-2.34/demos/fills.pl : GD-2.34/demos/truetype_test : GD-2.34/demos/shapes.pl : GD-2.34/demos/copies.pl : GD-2.34/demos/ttf.pl : GD-2.34/demos/gd_example.cgi : GD-2.34/demos/tile.png : GD-2.34/demos/polyline.pl : GD-2.34/demos/transform.pl : GD-2.34/qd.pl : GD-2.34/README : GD-2.34/Makefile.PL : GD-2.34/README.QUICKDRAW : GD-2.34/META.yml : GD-2.34/typemap : GD-2.34/bdf_scripts/ : GD-2.34/bdf_scripts/README : GD-2.34/bdf_scripts/bdf2gdfont.PLS : GD-2.34/bdf_scripts/bdftogd : GD-2.34/bdf_scripts/bdf2gdfont.pl : GD-2.34/README.unix : GD-2.34/ChangeLog : GD-2.34/MANIFEST : CPAN.pm: Going to build L/LD/LDS/GD-2.34.tar.gz : NOTICE: This module requires libgd 2.0.28 or higher. : If you are using Math::Trig 1.01 or lower, it has a bug that : causes a "prerequisite not found" warning to be issued. You may : safely ignore this warning. : Type perl Makefile.PL -h for command-line option summary : 'gdlib-config' 不是內部或外部命令、 : 可執行的程式或批次檔。 : Where is libgd installed? [/usr/lib] : Please choose the features that match how libgd was built: : Build JPEG support? [y] : Build PNG support? [y] : Build FreeType support? [y] : Build GIF support? [y] : Build support for animated GIFs? [y] : 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 : Note (probably harmless): No library found for -lgd : Note (probably harmless): No library found for -lpng : Note (probably harmless): No library found for -lz : Note (probably harmless): No library found for -lfreetype : Note (probably harmless): No library found for -ljpeg : Note (probably harmless): No library found for oldnames.lib : Note (probably harmless): No library found for kernel32.lib : Note (probably harmless): No library found for user32.lib : Note (probably harmless): No library found for gdi32.lib : Note (probably harmless): No library found for winspool.lib : Note (probably harmless): No library found for comdlg32.lib : Note (probably harmless): No library found for advapi32.lib : Note (probably harmless): No library found for shell32.lib : Note (probably harmless): No library found for ole32.lib : Note (probably harmless): No library found for oleaut32.lib : Note (probably harmless): No library found for netapi32.lib : Note (probably harmless): No library found for uuid.lib : Note (probably harmless): No library found for ws2_32.lib : Note (probably harmless): No library found for mpr.lib : Note (probably harmless): No library found for winmm.lib : Note (probably harmless): No library found for version.lib : Note (probably harmless): No library found for odbc32.lib : Note (probably harmless): No library found for odbccp32.lib : Note (probably harmless): No library found for msvcrt.lib : Writing Makefile for GD : 'nmake' 不是內部或外部命令、 : 可執行的程式或批次檔。 : nmake -- NOT OK : Running make test : Can't test without successful make : Running make install : make had returned bad status, install seems impossible : cpan> : 書上了例子(我存檔成4.pl): : use GD::Graph::bars3d; : my $graph=GD::Graph::bars3d->new(800,600); : my @files=</var/log/maillog.*.bz2>; : my $image=$graph->plot([[map/(\d+)\./g,@files],[map -s,@files],]) : or die $graph->error; : open my $fh,'>','3.png'ordie $!; : print $fh $image->png; : print "@ING\n"; : 我執行後MS-DOS出現如下: : C:\Perl>perl 4.pl : Can't locate GD/Graph/bars3d.pm in @INC (@INC contains: C:/Perl/lib C:/Perl/sit : e/lib .) at 4.pl line 1. : BEGIN failed--compilation aborted at 4.pl line 1. : 那到底是我沒有安裝成功GD模組,還是書上例題有錯呢?? : 對不起版面弄得有點長,希望高手教我!! : <(_ _)> -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 222.250.106.144
文章代碼(AID): #1539iYYS (Perl)
文章代碼(AID): #1539iYYS (Perl)