How many times have you stumbled upon an error message similar to this one:
But when you checked:
It showed you that it exists and sitting there staring at you?
The "foo: bar: not found" error message does not indicate that bar could not be found, but rather bar exists but is calling something that could not be found. This is the case with Perl scripts when the script cannot find where Perl is. I have noticed that most of out "out-of-the-box" Perl scripts point to "/usr/local/bin/perl" whereas some of the OS pre-bundled Perl is preinstalled at "/bin/perl", hence, when you run a Perl script, the "foo: bar: not found" pops out the terminal.
If you compile Apache, PHP and PECL packages, then the following errors might ring a bell:
and many other variants of the same error.
Solution:
Edit the nearest command which invoked the error, for ex. "/usr/local/bin/autom4te: not found" - the nearest invoker is autom4te. This denotes that probably autom4te is the Perl Script. Edit the file by hand and at the beginning of the script, write down the correct path to Perl.
If at the beginning of the file autom4te says:
#! /usr/local/bin/perl but "which perl" says "/bin/perl" then you have to update paths as necessary.
Well you can always symlink the Perl binary to where most Perl scripts expects it to be. ex:
"ln -s /bin/perl /usr/local/bin/perl"
..a dose of zero-day know-hows ..
Subscribe to:
Posts (Atom)