Installation

Why won't ./bin/check_modules.pl apache2 work?

Why won't ./bin/check_modules.pl apache2 work?

by Murray Eisenberg -
Number of replies: 4
With a cloned WeBWorK 2.8 under Mac OS X, yesterday I was able to determine the Perl module requirements by running in /opt/webwork/webwork2_github the command:

  ./bin/check_modules.pl apache2

Today when I try that again, I get lots of errors:

[murray:/opt/webwork/webwork2_github]$ ./bin/check_modules.pl apache2

./bin/check_modules.pl: line 1: D#!/usr/bin/env: No such file or directory

./bin/check_modules.pl: line 3: use: command not found

./bin/check_modules.pl: line 4: use: command not found

./bin/check_modules.pl: line 6: syntax error near unexpected token `('

./bin/check_modules.pl: line 6: `my @applicationsList = qw('


What's wrong now that wasn't before?
In reply to Murray Eisenberg

Re: Why won't ./bin/check_modules.pl apache2 work?

by Bill Farr -
Murray,
How did that D get there in the first line? It doesn't belong.

./bin/check_modules.pl: line 1: D#!/usr/bin/env: No such file or directory
                                ^

Also, you better make sure that 

/usr/bin/env perl

points to the correct version of Perl, i.e. the one MacPorts installed and
not the Apple one. 

Bill Farr
In reply to Bill Farr

Re: Why won't ./bin/check_modules.pl apache2 work?

by Murray Eisenberg -
When I execute /usr/bin/env perl (or same thing with sudo), nothing happens: the cursor just sits there on the next line of Terminal. What's the significance of that?

On the other hand:

  [murray:~]$ which perl

      /opt/local/bin/perl

 [murray:~]$ perl --version


     This is perl 5, version 18, subversion 2 (v5.18.2) built for darwin-thread- multi-2level


In reply to Murray Eisenberg

Re: Why won't ./bin/check_modules.pl apache2 work?

by Murray Eisenberg -
If I understand correctly, the reason I got no output from "/usr/bin/env perl" is that, as in WeBWorK's ./bin/check_modules.pl, one needs to supply additional input.
In reply to Bill Farr

Re: Why won't ./bin/check_modules.pl apache2 work?

by Murray Eisenberg -
Not sure where the D got into first line of check_modules.pl, but I removed it and now the command works as before.

And the output includes the following. I presume this (along with output from "which perl") verifies that it's the MacPorts version of perl being used.

Checking your @INC for modules required by WeBWorK...
@INC=     /opt/local/lib/perl5/site_perl/5.18.2/darwin-thread-multi-2level
     /opt/local/lib/perl5/site_perl/5.18.2
     /opt/local/lib/perl5/vendor_perl/5.18.2/darwin-thread-multi-2level
     /opt/local/lib/perl5/vendor_perl/5.18.2
     /opt/local/lib/perl5/5.18.2/darwin-thread-multi-2level
     /opt/local/lib/perl5/5.18.2
     /opt/local/lib/perl5/site_perl
     /opt/local/lib/perl5/vendor_perl