c:\>perl -de 1
Loading DB routines from perl5db.pl version 1.32
Editor support available.
Enter h or `h h' for help, or `man perldebug' for more help.
main::(-e:1): 1
DB<1> require XML::Parser::Expat
Can't load '/usr/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/XML/Parser/Expat/Expat.dll' for module XML::Parser::Expat: No such file or directory at /usr/lib
/perl5/5.10/i686-cygwin/DynaLoader.pm line 200.
at (eval 5)[/usr/lib/perl5/5.10/perl5db.pl:638] line 2
Compilation failed in require at (eval 5)[/usr/lib/perl5/5.10/perl5db.pl:638] line 2.
DB<2> q
c:\>
有人遇到过这个吗?如何解决?我的cygwin位于C:\cygwin
没有目录C:\cygwin\usr\lib
,但有C:\cygwin\lib
. 当我打开bash
并尝试cd /usr/lib
它成功(令人惊讶地)并且之后ls
似乎内容与目录相同C:\cygwin\lib
。
也就是说,该目录C:\cygwin\lib\perl5\vendor_perl\5.10\i686-cygwin\auto\XML\Parser\Expat
包含一个名为Expat.dll
.
似乎 cygwin 说它找不到这个文件,但是它怎么能找到/usr/lib/perl5/5.10/i686-cygwin/DynaLoader.pm
呢?
我试过这样做chmod +x
,但这并不能解决问题。
有什么帮助吗?
perl -MXML::Parser::Expat -e1
在命令行上执行返回:
c:\dev\trunk\src>perl -MXML::Parser::Expat -e1
Can't load '/usr/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/XML/Parser/Expat/Expat.dll' for module XML::Parser::Expat: No such file or directory at /usr/lib
/perl5/5.10/i686-cygwin/DynaLoader.pm line 200.
at -e line 0
Compilation failed in require.
BEGIN failed--compilation aborted.
编辑:另外,当我在 cygwin bash 环境中执行相同操作时(不是直接在 cmd 中),没有错误!