snmpkey command not found

In this troubleshooting guide we learn how to fix snmpkey command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

snmpkey: command not found

or when using sudo you get the following error message

sudo: snmpkey: command not found

Solutions to snmpkey: command not found

How To Fix snmpkey: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu snmpkey is provided by libnet-snmp-perl package.

libnet-snmp-perl is:

The module Net::SNMP implements an object oriented interface to the Simple Network Management Protocol. Perl applications can use the module to retrieve or update information on a remote host using the SNMP protocol. Net::SNMP is implemented completely in Perl, requires no compiling, and uses only standard Perl modules. SNMPv1 and SNMPv2c (Community-Based SNMPv2), as well as SNMPv3 with USM are supported by the module. SNMP over UDP as well as TCP with both IPv4 and IPv6 can be used. The Net::SNMP module assumes that the user has a basic understanding of the Simple Network Management Protocol and related network management concepts.

To fix this problem, we can install more using the command below.

sudo apt-get -y install libnet-snmp-perl

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install libnet-snmp-perl.

sudo apt -y install libnet-snmp-perl

Or if you have aptitude installed you can use the following command.

sudo aptitude install libnet-snmp-perl

Summary

In this tutorial we learn how to fix snmpkey command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.