# Perl Errno.pm issues



## mcglk (Feb 26, 2012)

So, about six weeks ago, I upgraded my new home server to FreeBSD 9â€“STABLE, and have had very few problems other than a few port reinstalls. I've been working on an installation of Apache and Template::Simple for testing purposes, and have it set up properly as a handler in the Apache configuration. But when I try to access one of the files that gets handled by Template::Simple, I'm getting this error in the Apache error log (wrapped for readability):


```
[<datetime>] [error] [client <ip>] failed to resolve handler `Template::Simple': Errno
architecture (i386-freebsd-64int-9.0-stable) does not match executable architecture
(i386-freebsd-64int-8.2-stable) at /usr/local/lib/perl5/5.14.2/mach/Errno.pm
line 11.\nCompilation failed in require at /usr/local/lib/perl5/site_perl/5.14.2/File/
Slurp.pm line 12.\nBEGIN failed--compilation aborted at /usr/local/lib/perl5/
site_perl/5.14.2/File/Slurp.pm line 12.\nCompilation failed in require at /usr/local/lib/perl5/
site_perl/5.14.2/Template/Simple.pm line 9.\nBEGIN failed--compilation aborted at
/usr/local/lib/perl5/site_perl/5.14.2/Template/Simple.pm line 9.\nCompilation
failed in require at (eval 4) line 2.\n
```

Fine, so the relevant error is â€œErrno architecture (i386-freebsd-64int-9.0-stable) does not match executable architecture (i386-freebsd-64int-8.2-stable)â€ in Errno.pm. A quick search using relevant terms turns up a few articles like thread 28040, which advise (re)installing the p5-Errno port. I hadn't installed that the first time the error showed up, but after researching it, I did, and got this instead.


```
[<datetime>] [error] [client <ip>] failed to resolve handler `Template::Simple': Errno
architecture (i386-freebsd-64int-9.0-stable) does not match executable architecture
(i386-freebsd-64int-8.2-stable) at /usr/local/lib/perl5/site_perl/5.14.2/Errno.pm
line 11.\nCompilation failed in require at /usr/local/lib/perl5/site_perl/5.14.2/File/
Slurp.pm line 12.\nBEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/
5.14.2/File/Slurp.pm line 12.\nCompilation failed in require at /usr/local/lib/perl5/
site_perl/5.14.2/Template/Simple.pm line 9.\nBEGIN failed--compilation aborted at
/usr/local/lib/perl5/site_perl/5.14.2/Template/Simple.pm line 9.\nCompilation
failed in require at (eval 4) line 2.\n
```

(The only difference being that the location of Errno.pm changed.)

A little further investigation turns up that Errno.pm is getting its information from â€œuse Config;â€. Getting the values that Config returns should be as simple as perl -V, which tells me that the relevant information that should be getting used is:


```
Platform:
    osname=freebsd, osvers=9.0-stable, archname=i386-freebsd-64int
```

which is correct. I did try reinstalling Perl, but there was no change.

So Iâ€™m wondering now is whether Apache is using a different version of Perl somehow, or of Config.pm. If so, I canâ€™t seem to find it. Any advice on how to fix this problem?


----------

