• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PerlTk摸索

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

在安装Tk的过程当中各种错误,让人无比的蛋疼。

记录下过程,方便以后回顾学习。

第一个错误:

    Going to read '/root/.cpan/Metadata'
      Database was generated on Thu, 09 May 2013 04:17:04 GMT
    Running install for module 'Tk'
    Running make for S/SR/SREZIC/Tk-804.030.tar.gz
    Checksum for /root/.cpan/sources/authors/id/S/SR/SREZIC/Tk-804.030.tar.gz ok

      CPAN.pm: Going to build S/SR/SREZIC/Tk-804.030.tar.gz

    /usr/bin/perl is installed in /usr/lib/perl/5.14 okay
    PPM for perl5.014002
    Test Compiling config/perlrx.c
    Test Compiling config/pmop.c
    Test Compiling config/pregcomp2.c
    Test Compiling config/regexp511.c
    Test Compiling config/signedchar.c
    Test Compiling config/Ksprintf.c
    Test Compiling config/svtrv.c
    Test Compiling config/tod.c
    Test Compiling -DTIMEOFDAY_TZ config/tod.c
    TZ gettimeofday()
    Using -L/usr/lib/x86_64-linux-gnu to find /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
    Cannot find X include files via /include
    Cannot find X include files anywhere.
    You probably need to install the X11 development package first.
    On Debian Linux, these are the packages libx11-dev and x-dev.
    Please see README.linux for more information.
    No 'Makefile' created'YAML' not installed, will not store persistent state
      SREZIC/Tk-804.030.tar.gz
      /usr/bin/perl Makefile.PL INSTALLDIRS=site -- NOT OK
    Running make test
      Make had some problems, won't test
    Running make install
      Make had some problems, won't install
    Could not read metadata file. Falling back to other methods to determine prerequisites

该错误的解决办法:

Debian:
apt-get install libX11-dev

接着新的错误:

      
chmod 755 ../blib/arch/auto/Tk/Scrollbar/Scrollbar.so
cp Scrollbar.bs ../blib/arch/auto/Tk/Scrollbar/Scrollbar.bs
chmod 644 ../blib/arch/auto/Tk/Scrollbar/Scrollbar.bs
make[1]: Leaving directory `/root/.cpan/build/Tk-804.030-znJcGu/Scrollbar'
make[1]: Entering directory `/root/.cpan/build/Tk-804.030-znJcGu/Scale'
cp Scale.pm ../blib/lib/Tk/Scale.pm
AutoSplitting ../blib/lib/Tk/Scale.pm (../blib/lib/auto/Tk/Scale)
/usr/bin/perl /usr/share/perl/5.14.2/ExtUtils/xsubpp  -typemap /usr/share/perl/5.14/ExtUtils/typemap -typemap /root/.cpan/build/Tk-804.030-znJcGu/Tk/typemap  Scale.xs > Scale.xsc && mv Scale.xsc Scale.c
cc -c  -I..  -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g   -DVERSION=\"804.03\" -DXS_VERSION=\"804.03\" -fPIC "-I/usr/lib/perl/5.14/CORE"   -Wall -Wno-implicit-int -Wno-comment -Wno-unused -D__USE_FIXED_PROTOTYPES__ Scale.c
Running Mkbootstrap for Tk::Scale ()
chmod 644 Scale.bs
rm -f ../blib/arch/auto/Tk/Scale/Scale.so
cc  -shared -L/usr/local/lib -fstack-protector Scale.o  -o ../blib/arch/auto/Tk/Scale/Scale.so ../pTk/libpTk.a    \
       -lm      \
      
chmod 755 ../blib/arch/auto/Tk/Scale/Scale.so
cp Scale.bs ../blib/arch/auto/Tk/Scale/Scale.bs
chmod 644 ../blib/arch/auto/Tk/Scale/Scale.bs
make[1]: Leaving directory `/root/.cpan/build/Tk-804.030-znJcGu/Scale'
make[1]: Entering directory `/root/.cpan/build/Tk-804.030-znJcGu/PNG'
cp PNG.pm ../blib/lib/Tk/PNG.pm
cd zlib && make libz.a "CC=cc -fPIC" RANLIB=":"
make[2]: Entering directory `/root/.cpan/build/Tk-804.030-znJcGu/PNG/zlib'
cc -fPIC -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -DUSE_MMAP   -c -o adler32.o adler32.c
cc -fPIC -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -DUSE_MMAP   -c -o compress.o compress.c
cc -fPIC -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -DUSE_MMAP   -c -o crc32.o crc32.c
cc -fPIC -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -DUSE_MMAP   -c -o gzio.o gzio.c
cc -fPIC -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -DUSE_MMAP   -c -o uncompr.o uncompr.c
cc -fPIC -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -DUSE_MMAP   -c -o deflate.o deflate.c
cc -fPIC -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -DUSE_MMAP   -c -o trees.o trees.c
cc -fPIC -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -DUSE_MMAP   -c -o zutil.o zutil.c
cc -fPIC -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -DUSE_MMAP   -c -o inflate.o inflate.c
cc -fPIC -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -DUSE_MMAP   -c -o infback.o infback.c
cc -fPIC -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -DUSE_MMAP   -c -o inftrees.o inftrees.c
cc -fPIC -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -DUSE_MMAP   -c -o inffast.o inffast.c
ar rc libz.a adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o zutil.o inflate.o infback.o inftrees.o inffast.o 
make[2]: Leaving directory `/root/.cpan/build/Tk-804.030-znJcGu/PNG/zlib'
cd libpng && make libpng.a "CC=cc -fPIC" RANLIB=":"
make[2]: Entering directory `/root/.cpan/build/Tk-804.030-znJcGu/PNG/libpng'
make[2]: *** 没有规则可以创建“libpng.a”需要的目标“all”。 停止。
make[2]: Leaving directory `/root/.cpan/build/Tk-804.030-znJcGu/PNG/libpng'
make[1]: *** [libpng/libpng.a] 错误 2
make[1]: Leaving directory `/root/.cpan/build/Tk-804.030-znJcGu/PNG'
make: *** [subdirs] 错误 2
  SREZIC/Tk-804.030.tar.gz
  /usr/bin/make -- NOT OK
'YAML' not installed, will not store persistent state
Running make test
  Can't test without successful make
Running make install
  Make had returned bad status, install seems impossible

这个错误还在想办法。分析下。

感觉极有可能是PNG的库问题。再次安装。

apt-get install libpng12-dev
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
下列软件包是自动安装的并且现在不需要了:
  xscreensaver-data
Use 'apt-get autoremove' to remove it.
将会安装下列额外的软件包:
  zlib1g-dev
下列【新】软件包将被安装:
  libpng12-dev zlib1g-dev
升级了 0 个软件包,新安装了 2 个软件包,要卸载 0 个软件包,有 236 个软件包未被升级。
需要下载 481 kB 的软件包。
解压缩后会消耗掉 1,034 kB 的额外空间。
您希望继续执行吗?[Y/n]y
获取:1 http://http.debian.net/debian/ wheezy/main zlib1g-dev amd64 1:1.2.7.dfsg-13 [215 kB]
获取:2 http://http.debian.net/debian/ wheezy/main libpng12-dev amd64 1.2.49-1 [266 kB]
下载 481 kB,耗时 3秒 (134 kB/s)       
Selecting previously unselected package zlib1g-dev:amd64.
(正在读取数据库 ... 系统当前共安装有 105931 个文件和目录。)
正在解压缩 zlib1g-dev:amd64 (从 .../zlib1g-dev_1%3a1.2.7.dfsg-13_amd64.deb) ...
Selecting previously unselected package libpng12-dev.
正在解压缩 libpng12-dev (从 .../libpng12-dev_1.2.49-1_amd64.deb) ...
正在处理用于 man-db 的触发器...
正在设置 zlib1g-dev:amd64 (1:1.2.7.dfsg-13) ...
正在设置 libpng12-dev (1.2.49-1) ...

继续安装试试。。

还是有问题:

# Start destroy 0
t/wm-time.t .................. ok   
t/wm.t ....................... ok   
t/X.t ........................ ok   
t/zzHList.t .................. ok     
t/zzPhoto.t .................. ok     
t/zzScrolled.t ............... ok     
t/zzText.t ................... ok     
t/zzTixGrid.t ................ ok     

Test Summary Report
-------------------
t/canvas.t                 (Wstat: 0 Tests: 166 Failed: 0)
  TODO passed:   124
t/listbox.t                (Wstat: 0 Tests: 537 Failed: 0)
  TODO passed:   320-322, 328
t/text.t                   (Wstat: 0 Tests: 415 Failed: 0)
  TODO passed:   121
t/unicode.t                (Wstat: 256 Tests: 13 Failed: 1)
  Failed test:  9
  Non-zero exit status: 1
t/wm-tcl.t                 (Wstat: 0 Tests: 315 Failed: 0)
  TODO passed:   86-87, 154-157, 164-165, 175-178, 221-224
                237-239, 264-269, 275-276, 280-283, 300
t/zzScrolled.t             (Wstat: 0 Tests: 94 Failed: 0)
  TODO passed:   52, 66, 80, 94
Files=72, Tests=4331, 53 wallclock secs ( 1.14 usr  0.11 sys + 13.72 cusr  1.21 csys = 16.18 CPU)
Result: FAIL
Failed 1/72 test programs. 1/4331 subtests failed.
make: *** [test_dynamic] 错误 255
  SREZIC/Tk-804.030.tar.gz
  /usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
  reports SREZIC/Tk-804.030.tar.gz
Running make install
  make test had returned bad status, won't install without force

继续研究下错误!

2013-5-9

手动make install就好。不需要理会它。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap