Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make generator mibs Error 2 #936

Closed
msfocusmr opened this issue Aug 3, 2023 · 1 comment
Closed

make generator mibs Error 2 #936

msfocusmr opened this issue Aug 3, 2023 · 1 comment

Comments

@msfocusmr
Copy link

msfocusmr commented Aug 3, 2023

Host operating system: output of uname -a

Linux test-app01.*******.** 4.18.0-372.16.1.0.1.el8_6.x86_64 #1 SMP Wed Jul 13 11:58:23 PDT 2022 x86_64 x86_64 x86_64 GNU/Linux
cat /etc/redhat-release
Red Hat Enterprise Linux release 8.7 (Ootpa)

snmp_exporter version: output of snmp_exporter -version

snmp_exporter --version
snmp_exporter, version 0.21.0 (branch: HEAD, revision: 0d8c3527cac0c26f1d6005b84b74413d14264c37)
  build user:       root@51dfd4b1f59b
  build date:       20221122-15:14:18
  go version:       go1.19.3
  platform:         linux/amd64

What device/snmpwalk OID are you using?

Im trying to switch from default "if_mib" to "dcs3fru-mib"
https://www.circitor.fr/Mibs/Html/D/DCS3FRU-MIB.php

If this is a new device, please link to the MIB(s).

https://www.circitor.fr/Mibs/Html/D/DCS3FRU-MIB.php

What did you do that produced an error?

sudo yum install gcc gcc-g++ make net-snmp net-snmp-utils net-snmp-libs net-snmp-devel # RHEL-based distros
git clone https://github.com/prometheus/snmp_exporter.git
cd snmp_exporter/generator
make generator mibs

What did you expect to see?

The script to be completed without Errors

What did you see instead?

make generator mibs
go build
"# github.com/prometheus/snmp_exporter/generator"
./net_snmp.go:19:10: fatal error: net-snmp/net-snmp-config.h: No such file or directory
 #include <net-snmp/net-snmp-config.h>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:67: generator] Error 2

When i comment this line out in the Script the next include fails...

go build
"# github.com/prometheus/snmp_exporter/generator"
./net_snmp.go:20:10: fatal error: net-snmp/mib_api.h: No such file or directory
 #include <net-snmp/mib_api.h>
          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:67: generator] Error 2

ll mibs/
total 12
-rw-r--r-- 1 root root 9628 Aug 3 17:49 DCS3FRU-MIB.mib

rpm -qa | grep -i snmp
net-snmp-5.8-27.0.1.el8.x86_64
net-snmp-libs-5.8-27.0.1.el8.x86_64
net-snmp-agent-libs-5.8-27.0.1.el8.x86_64
net-snmp-utils-5.8-27.0.1.el8.x86_64
snmp_exporter-0.21.0-1.el7.x86_64

please help

@SuperQ
Copy link
Member

SuperQ commented Aug 4, 2023

You are missing net-snmp-devel.

@SuperQ SuperQ closed this as completed Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants