Chinaunix

标题: 各位帮我看一下这是什么问题 can't locate the perl binary [打印本页]

作者: fangdingj    时间: 2008-04-17 22:49
标题: 各位帮我看一下这是什么问题 can't locate the perl binary
我编译module::build模块时遇到的问题,下面是操作过程
编经译其他的模块没问题,就是这个出这样的错误

  1. [fangjun@ziyun Module-Build-0.2808]$ perl Makefile.PL
  2. # running Build.PL
  3. Can't locate the perl binary used to run this script in (/usr/local/bin /usr/local/bin /usr/bin /home/fangjun/bin /bin /usr/bin /usr/local/bin /usr/X11R6/bin /usr/games /usr/lib/qt3/bin /sbin /usr/sbin /usr/local/sbin /usr/lib/qt3/bin)
  4. [fangjun@ziyun Module-Build-0.2808]$ type -a perl
  5. perl is /usr/bin/perl
  6. perl is /usr/local/bin/perl
  7. [fangjun@ziyun Module-Build-0.2808]$ ls -l /usr/bin/perl
  8. lrwxrwxrwx 1 root root 19  3月 17 19:49 /usr/bin/perl -> /usr/local/bin/perl*
  9. [fangjun@ziyun Module-Build-0.2808]$  
复制代码

这是makefile.pl的内容

  1. [fangjun@ziyun Module-Build-0.2808]$ cat Makefile.PL
  2. # This Makefile.PL creates a pass-through Makefile that simply calls
  3. # the equivalent Module::Build methods for each make target.  See the
  4. # documentation for Module::Build::Compat for more information.

  5. use lib qw(lib);
  6. use Module::Build::Compat;

  7. Module::Build::Compat->run_build_pl(args => \@ARGV);
  8. Module::Build::Compat->write_makefile(build_class => 'Module::Build');
  9. [fangjun@ziyun Module-Build-0.2808]$
复制代码

[ 本帖最后由 fangdingj 于 2008-4-17 22:55 编辑 ]
作者: apile    时间: 2008-04-18 16:57
实际执行看看/usr/bin/perl -V 看看有没有东西...
也许是symbolic link有问题..
作者: fangdingj    时间: 2008-04-18 21:18
回apile 大哥:
执行/usr/bin/perl -V 没有问题,输出的perl 的配置选项
链接没有问题,使用perl没有问题,就是在编译这个模块时出现问题,我觉得非常奇怪
看来我只有放弃编译这个模块了
作者: apile    时间: 2008-04-19 10:28
自己在该module 最上面加上一行
#!/usr/bin/perl
再编译看看...
作者: fangdingj    时间: 2008-04-19 13:20
谢谢apile大哥
根据你的提醒,我看了下Makefile.PL,有个run_buid_pl 于是我不用Makefile 直接执行 perl Build.Pl;./Build install 就好了,
可能是Module::Build::Compat 哪里有点小问题




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2