Question

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:\>

Anyone encountered this before? How to fix it? My cygwin is located in C:\cygwin

there is no directory C:\cygwin\usr\lib but there is C:\cygwin\lib. when I open up bash and try to cd /usr/lib it succeeds(surprisingly) and after a ls it seems the contents are the same as of the directory C:\cygwin\lib.

That said, the directory C:\cygwin\lib\perl5\vendor_perl\5.10\i686-cygwin\auto\XML\Parser\Expat contains a file named Expat.dll.

It seems that cygwin says it can't find this file but then how can it find /usr/lib/perl5/5.10/i686-cygwin/DynaLoader.pm?

I tried doing chmod +x but that doesn't fix it.

Any Help?

doing perl -MXML::Parser::Expat -e1 on the command line returns:

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.

EDIT: Also, when I do the same in cygwin bash environment(not in cmd directly), there is no error!

Was it helpful?

Solution

Going into cygwin bash shell first and then doing whatever I want does not give this error. So I'd suggest move all your perl commands of your bat script to a shell script and invoke that with bash.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top