ZenLikeThat
ZenLikeThat

Reputation: 2062

Cygwin hangs on Perl script: Nothing seems to fix

I'm running Windows 7 64 bit, which seems to be part of the problem. At first my cpan would hang when I would try to install CPAN from the shell prompt.

I tried restarting my computer, and a variety of attempts to use rebaseall and peflagsall from ash- even starting a new base for the dll's (the command was something suggested on a cygwin mailing list- something like rebaseall -vb 0x730000).

Should I just uninstall Cygwin and try to do a total reinstall? I have all the dependencies that cpan should need (i.e. gcc-4).

I'm getting pretty desperate here- I'm getting error messages that talk about failed dlls if I try to use modules installed from CPAN (specifically, JSON::XS).

Any help you could offer would be fantastic.

Thanks!

Upvotes: 1

Views: 1270

Answers (3)

me_and
me_and

Reputation: 15664

I suspect the problem you're hitting is the difference between the regular shell (which will normally be bash and give you a $ prompt on Cygwin) and the cpan shell (which will give you a prompt like cpan[1]>).

In the cpan shell, install CPAN will refresh a bunch of Perl scripts from the CPAN repository. From a bash shell, install CPAN just doesn't make sense: install is a program for installing packages you've just built; it has nothing in particular to do with Perl or with how you install packages on Cygwin.

You can enter the CPAN shell by running cpan at bash shell prompt. But I don't think that's what you need. What you actually want to do is just run the following:

cpan JSON::XS

Upvotes: 0

Marius Kjeldahl
Marius Kjeldahl

Reputation: 6824

The complaining about missing dlls when installing is a known bug I believe, and appears for a lot of modules. Most modules are still installed and still work however. In my experience, you need to force install most modules as well, as there is almost always some test that fails.

While I personally prefer perl from the cygwin environment, there is one good reason for installing Strawberryperl; the need for 64 bit support which cygwin does not support. If you are going to work with large XML data structures using XML::Simple for instance, the 1.5-2GB that 32-bit Windows support will not take you far, and Strawberryperl will come to your rescue. And thanks to perl portability, and apart from keeping two sets of perl's installed on the same computer, the is no problem doing development using cygwin, and then running it "in production" using 64-bit Strawberryperl.

Upvotes: 3

Borodin
Borodin

Reputation: 126762

Are you installing cygwin and then building Perl on top of that? You will be far more successful if you use Strawberry Perl which comes with its own cygwin environment that will allow you to build and install most CPAN modules if you need them

Upvotes: 2

Related Questions