net-snmp issue

When I run a script that polls a router I get the following error from net-snmp. I can not seem to find a straight answer. Could my mib files be corrupt?

xxx-xxx:/etc/sma/snmp/mibs# perl /export/home/user/perl/test.pl 
Unlinked OID in SNMPv2-MIB: snmp ::= { mib-2 11 }
Undefined identifier: mib-2 near line 273 of /etc/sma/snmp/mibs/SNMPv2-MIB.my
Unlinked OID in SNMPv2-MIB: system ::= { mib-2 1 }
Undefined identifier: mib-2 near line 87 of /etc/sma/snmp/mibs/SNMPv2-MIB.my
Unlinked OID in SNMPv2-MIB: snmpMIB ::= { snmpModules 1 }
Undefined identifier: snmpModules near line 25 of /etc/sma/snmp/mibs/SNMPv2-MIB.my
Unlinked OID in IANAifType-MIB: ianaifType ::= { mib-2 30 }
Undefined identifier: mib-2 near line 17 of /etc/sma/snmp/mibs/IANAifType-MIB.my
Did not find 'snmpTraps' in module SNMPv2-MIB (/etc/sma/snmp/mibs/IF-MIB.my)
Unlinked OID in IF-MIB: interfaces ::= { mib-2 2 }
Undefined identifier: mib-2 near line 49 of /etc/sma/snmp/mibs/IF-MIB.my
Unlinked OID in IF-MIB: ifMIB ::= { mib-2 31 }
Undefined identifier: mib-2 near line 16 of /etc/sma/snmp/mibs/IF-MIB.my
Unlinked OID in IF-MIB: linkUp ::= { snmpTraps 4 }
Undefined identifier: snmpTraps near line 1126 of /etc/sma/snmp/mibs/IF-MIB.my
Unlinked OID in IF-MIB: linkDown ::= { snmpTraps 3 }
Undefined identifier: snmpTraps near line 1114 of /etc/sma/snmp/mibs/IF-MIB.my
Unlinked OID in SNMP-FRAMEWORK-MIB: snmpFrameworkMIB ::= { snmpModules 10 }
Undefined identifier: snmpModules near line 10 of /etc/sma/snmp/mibs/SNMP-FRAMEWORK-MIB.my
Cannot adopt OID in SNMPv2-MIB: snmpMIBGroups ::= { snmpMIBConformance 2 }
Cannot adopt OID in SNMPv2-MIB: snmpMIBCompliances ::= { snmpMIBConformance 1 }
Cannot adopt OID in IF-MIB: ifSpecific ::= { ifEntry 22 }
Cannot adopt OID in IF-MIB: ifOutQLen ::= { ifEntry 21 }
Cannot adopt OID in IF-MIB: ifOutErrors ::= { ifEntry 20 }
Cannot adopt OID in IF-MIB: ifOutDiscards ::= { ifEntry 19 }
Cannot adopt OID in IF-MIB: ifOutNUcastPkts ::= { ifEntry 18 }
Cannot adopt OID in IF-MIB: ifOutUcastPkts ::= { ifEntry 17 }
Cannot adopt OID in IF-MIB: ifOutOctets ::= { ifEntry 16 }
Cannot adopt OID in IF-MIB: ifInUnknownProtos ::= { ifEntry 15 }
Cannot adopt OID in IF-MIB: ifInErrors ::= { ifEntry 14 }
Cannot adopt OID in IF-MIB: ifInDiscards ::= { ifEntry 13 }
Cannot adopt OID in IF-MIB: ifInNUcastPkts ::= { ifEntry 12 }
Cannot adopt OID in IF-MIB: ifInUcastPkts ::= { ifEntry 11 }
Cannot adopt OID in IF-MIB: ifInOctets ::= { ifEntry 10 }
Cannot adopt OID in IF-MIB: ifLastChange ::= { ifEntry 9 }
Cannot adopt OID in IF-MIB: ifOperStatus ::= { ifEntry 8 }
Cannot adopt OID in IF-MIB: ifAdminStatus ::= { ifEntry 7 }
Cannot adopt OID in IF-MIB: ifPhysAddress ::= { ifEntry 6 }
Cannot adopt OID in IF-MIB: ifSpeed ::= { ifEntry 5 }
Cannot adopt OID in IF-MIB: ifMtu ::= { ifEntry 4 }
Cannot adopt OID in IF-MIB: ifType ::= { ifEntry 3 }
Cannot adopt OID in IF-MIB: ifDescr ::= { ifEntry 2 }
Cannot adopt OID in IF-MIB: ifIndex ::= { ifEntry 1 }
Cannot adopt OID in SNMPv2-MIB: snmpBasicComplianceRev2 ::= { snmpMIBCompliances 3 }
Cannot adopt OID in SNMPv2-MIB: snmpBasicCompliance ::= { snmpMIBCompliances 2 }
Cannot adopt OID in IF-MIB: ifConformance ::= { ifMIB 2 }
Cannot adopt OID in IF-MIB: ifMIBObjects ::= { ifMIB 1 }
Cannot adopt OID in IF-MIB: ifRcvAddressEntry ::= { ifRcvAddressTable 1 }
Cannot adopt OID in SNMPv2-MIB: snmpSetSerialNo ::= { snmpSet 1 }
Cannot adopt OID in SNMP-FRAMEWORK-MIB: snmpPrivProtocols ::= { snmpFrameworkAdmin 2 }
Cannot adopt OID in SNMP-FRAMEWORK-MIB: snmpAuthProtocols ::= { snmpFrameworkAdmin 1 }
Cannot adopt OID in SNMPv2-MIB: snmpObsoleteGroup ::= { snmpMIBGroups 10 }
Cannot adopt OID in SNMPv2-MIB: snmpNotificationGroup ::= { snmpMIBGroups 12 }
Cannot adopt OID in SNMPv2-MIB: snmpWarmStartNotificationGroup ::= { snmpMIBGroups 11 }
Cannot adopt OID in SNMPv2-MIB: snmpBasicNotificationsGroup ::= { snmpMIBGroups 7 }
Cannot adopt OID%2

using the same directory of MIBs (export MIBSDIR=/etc/sma/snmp/mibs; export MIBS=ALL), walk the device you are after. do you still get the same output from net-snmp ?

what version of net-snmp are you using?

Well that made it worse... Now none of the mibs are working?

I am using net-snmp 5.2.

This one has me stumped.

---------- Post updated 04-28-10 at 10:07 AM ---------- Previous update was 04-27-10 at 02:40 PM ----------

Ok, I finally got a solution. Ran these commands.

xxx-xxx:/etc/sma/snmp/mibs# MIBDIRS=/usr/local/share/snmp/mibs:/etc/sma/snmp/mibs
xxx-xxx:/etc/sma/snmp/mibs# export MIBDIRS
xxx-xxx:/etc/sma/snmp/mibs# MIBS=ALL;export MIBS