SNMP installation

Solved
staryb Posted messages 18 Status Member -  
 staryb -
Good evening everyone. I would like to ask for your help regarding an SNMP installation error on Ubuntu following a supervision project with EON.
By running the command
apt-get install snmp
, this is what it outputs:

Reading package lists... Done
Building dependency tree
Reading state information... Done
No available version of the package snmp, but it is I reverted in the database.
This usually means that the package is missing, has become obsolete, or is only available from another source.
However the following packages replace it:
libsnmp15

The package "snmp" has no available version


What can I do?

4 answers

  1. mamiemando Posted messages 33228 Registration date   Status Moderator Last intervention   7 940
     
    Hello,

    In short, apt tells you that this package doesn't exist. To search for a package name, you should use apt-cache. I invite you first to discover how apt is used: https://www.mistra.fr/tutoriel-linux-apt.html

    Then, the ideal is to follow a tutorial. Often the tutorial also gives you the package name, saving you from having to search with apt-cache (in this case snmpd under Ubuntu).

    https://doc.ubuntu-fr.org/snmp

    For administration, you can refer to what is said on the Debian wiki, because globally Ubuntu is a simplified Debian, so if you know how to do it under Debian, you know how to do it under Ubuntu:
    https://wiki.debian.org/SNMP

    Then don’t hesitate to look for tutorials with your preferred search engine, and tell us when you are blocked on what is causing the problem. Just prefer tutorials that go through apt to install packages (installation is much cleaner than via sources).

    Good luck
    1
    1. staryb Posted messages 18 Status Member
       
      okay, understood. thank you
      0
    2. staryb Posted messages 18 Status Member
       
      Hello
      Thank you for the promptness of your reply
      I was able to read the tutorials you sent me but with the first link https://www.mistra.fr/tutoriel-linux-apt.html, trying with these commands for installing the snmp package I still did not get satisfaction:
      Here are the commands I used:

      apt-get update
      Reading package lists... Done

      apt-cache search snmp
      Libsnmp-base - SNMP (Simple Network Management Protocol) MIBs and documentation
      Libsnmp15 - SNMP (Simple Network Management Protocol) library
      tcpdump - command-line network traffic analyzer

      apt-get install snmp
      Reading package lists... Done
      Building dependency tree
      Reading state information... Done
      No version of package snmp is available, although it is listed in the package database.
      This usually means that the package is missing, has become obsolete, or is available from another source.
      However, the following packages replace it:
      libsnmp15

      Package "snmp" has no installation candidate.
      In this case, what else can I do to get out of this? because without installing this package I will not be able to proceed with the configuration
      0
  2. mamiemando Posted messages 33228 Registration date   Status Moderator Last intervention   7 940
     
    Unfortunately, I don’t see anything in this content

    Are you sure you respected the path I indicated?

    cat /etc/apt/sources.list


    Because if it’s empty, that means you have no repositories and you can’t install anything at all with apt! In that case :

    1) Determine your Ubuntu version (for example xenial if you are on 16.04).
    https://fr.wikipedia.org/wiki/Liste_des_versions_d%27Ubuntu#Historique_des_versions.5B3.5D

    If you don’t know which one it is this command should help you:
    sb-release -d


    You can also use one of the other methods suggested here :
    https://doc.ubuntu-fr.org/versions

    2) Open the configuration file
    /etc/apt/sources.list


    gksudo gedit /etc/apt/sources.list &


    3) Copy-paste the parts related to the French servers main restricted ; universe multiverse.
    https://doc.ubuntu-fr.org/depots_trusty

    4) If you are not on trusty, replace the trusty by the adjective that qualifies your Ubuntu version (in lowercase): for example: vivid, xenial, etc... I strongly advise not to use this as an opportunity to upgrade to a newer version (if you want to migrate your Ubuntu to a newer version, there will always be time to do it later, after taking care to back up your important documents).

    5) Save and exit, then run:

    sudo apt-get update
    sudo apt-get upgrade
    sudo apt-get install snmp


    Good luck

    :
    1
    1. staryb Posted messages 18 Status Member
       
      Hello
      Thanks, understood, I’ll do it and then I’ll get back to you
      0
    2. staryb
       
      Hello
      I finally managed to install, but I’m having difficulties with SNMP configuration
      0
    3. staryb
       
      Here are the commands I used after installation, but the file sudo nano snmpd.conf is empty. sudo apt-get install snmp snmpd cd /etc/snmp sudo cp snmpd.conf snmpd.conf.origi sudo nano snmpd.conf But unfortunately this file sudo nano snmpd.conf is empty Should I also edit it? Thanks for your input and support
      0
  3. mamiemando Posted messages 33228 Registration date   Status Moderator Last intervention   7 940
     
    Hello,

    The file may not be named exactly like that; try to find its name, for example using
    apt-file
    :

    sudo apt-get update
    sudo apt-get install apt-file
    sudo apt-file update
    apt-file list snmp | grep /etc


    Good luck
    1
    1. staryb Posted messages 18 Status Member
       
      Hello
      I finally managed to complete the configuration. Infinite thanks for your help and the contribution that has been of great support to me.
      I take this opportunity to once again ask for your help with the installation and configuration of Cacti. To be honest, I started doing it with the command sudo apt-get install cacti which sent me to a page where I had to enter a new password for the configuration, but I cancelled it. Now I don’t really know how to proceed.
      Thanks in advance
      0
    2. staryb
       
      Hello
      Okay, understood, thank you
      0
  4. mamiemando Posted messages 33228 Registration date   Status Moderator Last intervention   7 940
     
    Can you report the contents of
    /etc/apt/sources.list
    ? Because this package is supposed to exist:
    https://packages.ubuntu.com/xenial/snmp

    Good luck
    0
    1. staryb Posted messages 18 Status Member
       
      Ok, understood, thank you.
      Unfortunately, I don’t see anything in this content
      0