在Cygwin中运行wyd.pl-无法找到对象方法"init".通过软件包"wlgmod :: doc" [英] Running wyd.pl in Cygwin - Can't locate object method "init" via package "wlgmod::doc"

查看:79
本文介绍了在Cygwin中运行wyd.pl-无法找到对象方法"init".通过软件包"wlgmod :: doc"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

经过几天的尝试以获得wyd.pl 在我的Windows 7计算机上运行,​​我终于很接近了.我已经在第5次尝试中安装了Cygwin的工作版本,现在我有了一个有效的bash shell.

但是,在bash中运行以下WyD命令时:

$ wyd.pl -b -e -t -s 3 -o输出文件"目标目录"

...我因单个缺少的依赖项而出错:

在/cygdrive/c/WYD/wyd.pl第284行处无法通过包"wlgmod :: doc"(也许您忘记加载"wlgmod :: doc"吗?)定位对象方法"init".>

有时将 wlgmod :: doc 替换为 wlgmod:jpeg wlgmod :: plain ,但这是相同的基本错误.与我尝试在CMD中运行该程序的时候相比,这是一个可喜的变化,当时它返回了数十个缺少的依赖项,但是我想弄清楚如何使最后一个消失,这样我才能最终运行该程序./p>

在Windows上WyD的安装目录中查找- C:\ WYD -我看到一个名为 wlgmod 的文件夹,其中包含 doc.pm jpeg.pm html.pm 等.大概是bash要求的2个程序包,但从上述错误的输出来看,它似乎是从同一目录运行WyD的,所以我对为什么找不到这些文件感到困惑.

我唯一能猜到的是,这一切与正在运行的Perl版本有关.在两个控制台中都执行 perl -v 可以增强这一点.

  CMD-V5.24.1Cygwin/bash-V5.22.3 

除此之外...我真的很困惑,我不知道自己在做什么.

解决方案

wyd.pl是perl脚本,它需要一些perl模块来解析文件.解决方法如下:

  1. 获取 OpenOffice :: OOD

  perl -MCPAN -e shell安装OpenOffice :: OOD 

  1. 获取 catdoc

  tar xzvf catdoc-0.94.tar.gz./配置制作进行安装 

  1. 获取 jhead

  tar xzvf jhead-latest.tar.gzcd jhead-2.90制作 

  1. 获取 mp3info

  cd mp3info-0.8.5a制作mp3info制作install-mp3info 

  1. apt-get install libncurses5-dev libncursesw5-dev

After a few days of trying to get wyd.pl running on my Windows 7 machine, I'm finally pretty close. I've installed a working version of Cygwin on what must be the 5th attempt, and I now have a working bash shell.

However, when running the following WyD command in bash:

$ wyd.pl -b -e -t -s 3 -o "OUTPUTFILE" "TARGETDIRECTORY"

...I get an error for a single missing dependency:

Can't locate object method "init" via package "wlgmod::doc" (perhaps you forgot to load "wlgmod::doc"?) at /cygdrive/c/WYD/wyd.pl line 284.

Sometimes wlgmod::doc is replaced with wlgmod:jpeg or wlgmod::plain, but it's the same basic error. This is a welcome change from when I tried to run the program in CMD, which came back with tens of missing dependencies, but I'd like to figure out how to make this final one go away so I can finally run the program.

Looking in the directory where WyD is installed on Windows - C:\WYD - I see a folder called wlgmod, which contains doc.pm, jpeg.pm, html.pm, etc. Presumably, these are the 2packages" that bash is asking for, but judging by the output of the above error, it seems to be running WyD from that very same directory, so I'm confused as to why it can't find those files.

The only thing I can guess is that all this has something to do with the version of Perl being run. Doing perl -v in both consoles bolsters this a little.

CMD - V5.24.1
Cygwin/bash - V5.22.3

Other than that... I'm really confused and I have no idea what I'm doing.

解决方案

wyd.pl is perl script and it needs some perl modules to parse the files. Here’s how to resolve:

  1. Get OpenOffice::OOD

perl -MCPAN -e shell

install OpenOffice::OOD

  1. Get catdoc

 tar xzvf catdoc-0.94.tar.gz

 ./configure

 make

 make install

  1. Get jhead

  tar xzvf jhead-latest.tar.gz

  cd jhead-2.90

  make

  1. Get mp3info

 cd mp3info-0.8.5a

 make mp3info

 make install-mp3info

  1. apt-get install libncurses5-dev libncursesw5-dev

这篇关于在Cygwin中运行wyd.pl-无法找到对象方法"init".通过软件包"wlgmod :: doc"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆