tuturyokgaming
tuturyokgaming

Reputation: 259

Cygwin usr/bin/perl: bad interpreter : Permission denied

Hello I'm trying to run a perl script on a Windows 64 bit. I'm getting the error like this :

/usr/bin/perl : bad interpreter : Permission denied

I have my perl script on my windows 64 bit C:\test\perlscripts\testperl.pl.

Upvotes: 1

Views: 5653

Answers (2)

Thanh Cong Vu
Thanh Cong Vu

Reputation: 91

You may not install Perl in default cygwin64 package. Please ensure that you have Perl at /usr/bin/perl.exe.

If it is not there, run setup-x86_64.exe again and select Perl interpreter.

Upvotes: 2

Sinan Ünür
Sinan Ünür

Reputation: 118118

You probably saved the Perl script with DOS style line endings. The shell is looking for a file called /usr/bin/perl<CR>.

Save your files with Unix-style line endings. My .vimrc which I use with my natively compiled vim and gvim has:

set fileformat=unix
set fileformats=unix,dos

Check your editor's settings for the appropriate options.

To fix line endings in a particular file, use $ dos2unix filename.

Upvotes: 3

Related Questions