# net-snmp perl re-install issue



## jonfr (May 9, 2013)

I am having perl re-install issue when it comes to net-snmp. I am not sure what the issue is now, but it comes from this thread here that I was following. This issue was not present before I did try to downgrade perl down a version.

http://forums.freebsd.org/showthread.php?t=33244

This error is still present in my system, but I am ignoring it since it seems that mrtg works anyway. I cannot now re-install net-snmp to account for change in version of perl.

Here is the error that I can when I try to run `# make reinstall`


```
install: installed UDP-MIB.txt in /usr/local/share/snmp/mibs
install: installed NET-SNMP-PASS-MIB.txt in /usr/local/share/snmp/mibs
install: installed NET-SNMP-EXTEND-MIB.txt in /usr/local/share/snmp/mibs
install: installed UCD-DLMOD-MIB.txt in /usr/local/share/snmp/mibs
install: installed SNMP-NOTIFICATION-MIB.txt in /usr/local/share/snmp/mibs
install: installed SNMPv2-TM.txt in /usr/local/share/snmp/mibs
install: installed NET-SNMP-VACM-MIB.txt in /usr/local/share/snmp/mibs
install: installed DISMAN-SCHEDULE-MIB.txt in /usr/local/share/snmp/mibs
make: don't know how to make /usr/local/lib/perl5/5.12.4/mach/Config.pm. Stop
*** [perlinstall] Error code 2

Stop in /usr/ports/net-mgmt/net-snmp/work/net-snmp-5.7.2.
*** [do-install] Error code 1

Stop in /usr/ports/net-mgmt/net-snmp.
*** [install] Error code 1

Stop in /usr/ports/net-mgmt/net-snmp.
*** [reinstall] Error code 1

Stop in /usr/ports/net-mgmt/net-snmp.
```

I am not sure if any more packages suffer from the same issue. I do however want this issue solved without having to re-install FreeBSD from start up. I am not sure why this error did start, but it did happen after I did remove perl-5.12 and moved to perl-5.14 as it was before.

Here is the list of the package affected when I did remove perl-5.14 first time around. I am re-installing every package on this list, expect p5-* packages as they where not re-installed when I was using perl-5.12 for a short time.


```
isc-dhcp42-server-4.2.5
net-snmp-5.7.2_2
p5-Locale-gettext-1.05_3
help2man-1.41.2
autoconf-2.69
automake-1.12.6
ntp-4.2.6p5_2
glib-2.34.3
gamin-0.1.10_5
gio-fam-backend-2.34.3
cairo-1.10.2_5,2
gobject-introspection-1.34.2
p5-XML-Parser-2.41_1
intltool-0.41.1
dbus-glib-0.100.1
avahi-app-0.6.29_3
apache24-2.4.4_1
p5-Net-SSLeay-1.54
p5-IO-Tty-1.10
p5-Authen-PAM-0.16_1
webmin-1.620_1
p5-SNMP_Session-1.13
p5-Socket6-0.23
p5-IO-Socket-INET6-2.69
p5-Crypt-CBC-2.32
p5-Crypt-DES-2.05
p5-Digest-SHA1-2.13
p5-Digest-HMAC-1.03
p5-Net-SNMP-6.0.1
mrtg-2.17.4_3,1
```

Thanks for the help.


----------



## jonfr (May 9, 2013)

This is a wrong library path in the system, I am not sure how to fix it properly. It turns out that net-snmp is searching for version 5.12.4 of Perl, not version 5.14.2_3.

Trying to re-install this Perl scripts gives me the following errors.


```
p5-SNMP_Session-1.13
p5-Socket6-0.23
p5-IO-Socket-INET6-2.69
p5-Crypt-CBC-2.32
p5-Crypt-DES-2.05
p5-Digest-SHA1-2.13
p5-Digest-HMAC-1.03
p5-Net-SNMP-6.0.1
p5-Net-SSLeay-1.54
p5-IO-Tty-1.10
p5-Authen-PAM-0.16_1
p5-XML-Parser-2.41_1
```

When I try to re-install any of this packages, at least the ones I have tested. I get this error.


```
make reinstall
===>  Installing for p5-Net-SNMP-6.0.1
===>   p5-Net-SNMP-6.0.1 depends on package: p5-Crypt-DES>=0 - found
===>   p5-Net-SNMP-6.0.1 depends on package: p5-Digest-SHA1>=0 - found
===>   p5-Net-SNMP-6.0.1 depends on package: p5-Digest-HMAC>=0 - found
===>   p5-Net-SNMP-6.0.1 depends on file: /usr/local/bin/perl5.14.2 - found
===>   Generating temporary packing list
Makefile out-of-date with respect to /usr/local/lib/perl5/5.14.2/mach/Config.pm /usr/local/lib/perl5/5.14.2/mach/CORE/config.h
Cleaning current config before rebuilding Makefile...
make -f Makefile.old clean > /dev/null 2>&1
/usr/local/bin/perl5.14.2 Makefile.PL "INSTALLDIRS=site" "CC=cc" "CCFLAGS=-O2 -pipe -fno-strict-aliasing" "PREFIX=/usr/local" "INSTALLPRIVLIB=/usr/local/lib" "INSTALLARCHLIB=/usr/local/lib"
Checking if your kit is complete...
Looks good
Writing Makefile for Net::SNMP
Writing MYMETA.yml
==> Your Makefile has been rebuilt. <==
==> Please rerun the make command.  <==
false
*** [Makefile] Error code 1

Stop in /usr/ports/net-mgmt/p5-Net-SNMP/work/Net-SNMP-v6.0.1.
*** [do-install] Error code 1

Stop in /usr/ports/net-mgmt/p5-Net-SNMP.
*** [reinstall] Error code 1

Stop in /usr/ports/net-mgmt/p5-Net-SNMP.
```

Thanks for the help.


----------



## jonfr (May 9, 2013)

I did manage to solve this problem, I did use the following threads to solve this issue.

http://forums.freebsd.org/showthread.php?t=33244
http://forums.freebsd.org/showthread.php?t=22684
http://forums.freebsd.org/showthread.php?t=2899

This issue has been resolved. I got few others that I have to solve properly, but they are not of this nature.


----------



## fabiokaminski (Sep 16, 2013)

I just got this same issue building Perl 5.14 from ports. And the error in my case, was that my motherboard had reset the date to four years ago, and since the Makefile files were created with this old date there is this check, which detected this file being older, and creates it all over again. But since it's always the same old date, it never compiled properly.

The solution (in my case, if anybody is running through this) was to reset the date to the current time.


----------

