Running wyd.pl in Cygwin - Can't locate object method “init” via package “wlgmod::doc”

 ̄綄美尐妖づ 提交于 2019-12-25 07:49:46

问题


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.


回答1:


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


来源:https://stackoverflow.com/questions/41926832/running-wyd-pl-in-cygwin-cant-locate-object-method-init-via-package-wlgmod

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!