AWStats: bad interpreter: No such file or directory

From FVue
Jump to: navigation, search

Problem

I upgraded from Debian 3.1 (Sarge) to Debian 4 (Etch). Now running awstats.pl gives me this error:

sh: /usr/share/doc/awstats/examples/logresolvemerge.pl: /usr/bin/perl^M: bad interpreter: No such file or directory
Phase 1 : First bypass old records, searching new record...
Searching new records from beginning of log file...
Error: Command for pipe '/usr/share/doc/awstats/examples/logresolvemerge.pl /home/freddy/proj/fvue/log/apache/new~/* |' failed
Setup ('./awstats.www.fvue.nl.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).

Environment

  • Debian 4.0
  • awstats 6.5 (build 1.857)

Solution

Change LogFile setting in file awstats.conf to contain perl:

LogFile="/usr/share/doc/awstats/examples/logresolvemerge.pl logfile |"       # Wrong
LogFile="perl /usr/share/doc/awstats/examples/logresolvemerge.pl logfile |"  # Good

Journal

20070507

Why can't perl be found?

$> which perl
/usr/bin/perl
$> ls -l /usr/bin/perl
-rwxr-xr-x 2 root root 1061700 2006-12-07 00:30 /usr/bin/perl
http://www.hovinne.com/blog/index.php/Debian
Blog with same problem, and solution. French.

Comments

blog comments powered by Disqus