Ad Widget

Collapse

Installation Problems......Heeeeelp!!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dudds
    Junior Member
    • Mar 2007
    • 16

    #1

    Installation Problems......Heeeeelp!!

    When I am trying to compile the server I get the following:

    ./configure --enable-server --with-mysql --with-net-snmp
    ........a lot of output excluded
    checking for net-snmp-config... /usr/bin/net-snmp-config
    checking for main in -lnetsnmp ... no
    configure: error: Not found NET-SNMP library

    As far as I can tell though the net-snmp library is installed!!

    What could possibly be the problem??
  • bee
    Senior Member
    • Jun 2007
    • 133

    #2
    Hi,
    can i have what operating system that you're use for zabbix installation? last time, ihad similar paroblem on freebsd 4.11 and freebsd 6.x, and what i do to solve the problem just create a symlink for libnetsnmp to /usr/lib

    Hope that help.
    BEE

    Comment

    • dudds
      Junior Member
      • Mar 2007
      • 16

      #3
      Thanks Bee the system is RHEL4. Any ideas? BTW it v1.4.1 that I'm trying to install.

      Comment

      • bee
        Senior Member
        • Jun 2007
        • 133

        #4
        Hi,
        I'm not familiar with RHEL4, but i think in most of Linux distribution you will need to have net-snmp devel installed on your system.

        Hope that help.

        Thanks,
        Dede Nurmansyah

        Comment

        • dudds
          Junior Member
          • Mar 2007
          • 16

          #5
          Thanks again, but I do have that package installed already. It's getting very frustrating :-). I have everything else configured and ready to go it's just this last little bit that I cannot get to work no matter what I do.

          I'm not that experienced with Linux or programming so I really don't know where to go next. This is really frustrating because I just want to use this great tool to help me manage my network.

          Comment

          • kisters
            Junior Member
            • Jan 2006
            • 7

            #6
            Hi,

            can you check if all net-snmp packets are installed by
            rpm -qa | grep snmp

            I'm using RH5 / CentOS 5 and my output is:

            net-snmp-5.3.1-14.0.1.el5
            net-snmp-utils-5.3.1-14.0.1.el5
            net-snmp-libs-5.3.1-14.0.1.el5
            net-snmp-devel-5.3.1-14.0.1.el5

            Last time I had net-snmp installed but net-snmp-devel was missing. Just install it with yum install net-snmp-devel or search for the appropiate rpm on the installation media and install by rpm.

            Regards

            Comment

            • bee
              Senior Member
              • Jun 2007
              • 133

              #7
              Originally posted by dudds
              Thanks again, but I do have that package installed already. It's getting very frustrating :-).
              Then you need to install net-snmp devel package on your linux distribution. Ussualy, this packages came along with the CD's. Or you can seek the rpm package for net-snmp devel on internet, try google.
              The other trick, you can follow the kisters advise.

              Thanks,
              BEE

              Comment

              • markpr
                Member
                • Sep 2005
                • 31

                #8
                Here's my workaround (ran into this problem last night and did not have a lot of time to troubleshoot). This is the inelegant workaround.

                For some reason the new configure script (in 1.4.x) is not returning the correct values from the external script "net-snmp-config". I also had the same problem with the curl script "curl-config"

                If you run Zabbix configure and then check the config.log you'll see that SNMP_LIBS is empty. This will verify that you have the same problem as I do.

                Run the net-snmp-config command manually:

                # ./net-snmp-config --libs

                This command: "lists libraries needed for building applications"

                Find the line in the Zabbix "configure" for SNMP_LIBS and hard-code the results of the net-snmp-config --libs output into the script. Here are my changes:

                SNMP_LIBS="-L/usr/lib -lnetsnmp -lcrypto -lm -lwrap"

                you should then get past this error..... I was able to complete my upgrade from 1.1.7 to 1.4.1 and validate that SNMP was working.

                Mark

                Comment

                • dudds
                  Junior Member
                  • Mar 2007
                  • 16

                  #9
                  Thanks for the tip Mark. I'm just about to try it. When I search through the zabbix configure script I see that there is three places where SNMP_LIBS= is located. Which one do I need to modify? Can you give me a line number?

                  By the way where does the config.log file live?

                  Cheers,
                  David
                  Last edited by dudds; 24-07-2007, 03:54.

                  Comment

                  • markpr
                    Member
                    • Sep 2005
                    • 31

                    #10
                    David,

                    Here's the code snippet from "configure" showing where I modified SNMP_LIBS

                    ?SNMP_LIBS
                    want_netsnmp="no"
                    elif test "$withval" = "yes"; then
                    want_netsnmp="yes"
                    else
                    want_netsnmp="yes"
                    _libnetsnmp_config=$withval
                    fi

                    else
                    want_netsnmp=no
                    fi


                    SNMP_CFLAGS=""
                    SNMP_LDFLAGS=""
                    SNMP_LIBS="-L/usr/lib -lnetsnmp -lcrypto -lm -lwrap"

                    The config.log will be created in the same directory where you run "configure" from. You should see a config.log, config.status created in this directory. You don't need to do anything with these files but config.log can be helpful when troubleshooting build related problems.

                    Mark

                    Comment

                    • dudds
                      Junior Member
                      • Mar 2007
                      • 16

                      #11
                      Thanks again Mark but I'm still getting the same error when I run the configure script even after making the changes you sugested. Just to go over everything I run the following command:

                      ./configure --enable-server --with-mysql --with-net-snmp

                      The output of the command near where the error occurs is:

                      checking for curl-config... /usr/bin/curl-config
                      checking for the version of libcurl... 7.12.1
                      checking for libcurl >= version 7.15.1... no
                      checking for net-snmp-config... /usr/bin/net-snmp-config
                      checking for main in -lnetsnmp ... no
                      configure: error: Not found NET-SNMP library

                      I have made the change that you requested and in the config.log file I now see the following for SNMP_LIBS:

                      SNMP_LIBS='-L/usr/lib -lnetsnmp -lcrypto -lelf -lm'

                      The output of the command /usr/bin/net-snmp-config --libs is:

                      -L/usr/lib -lnetsnmp -lcrypto -lelf -lm

                      I have noticed that this above line is different to your output from this command.

                      There is one thing that I did notice from the config.log file and it is the following:

                      configure:10299: gcc -o conftest -g -O2 -I/usr/include/mysql -g -pipe -m32 -march=i386 -mtune=pentium4 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/usr/include/rpm -I/usr/include/rpm -I. -I/usr/include/net-snmp -L/usr/lib/mysql -L/usr/lib conftest.c -lnetsnmp -lm -lresolv -lnsl -lmysqlclient -L/usr/lib -lnetsnmp -lcrypto -lelf -lm >&5
                      /usr/bin/ld: cannot find -lelf
                      collect2: ld returned 1 exit status
                      configure:10305: $? = 1
                      configure: failed program was:
                      | /* confdefs.h. */

                      This doesn't mean much to me but it seems as though the -lelf bit is causing a problem?? I could be wrong am I looking down the wrong path??

                      Mate I hate to be a pain, but I feel like I'm real close now to getting it to work. Any other assistance you could give would be great.

                      Thanks,
                      David

                      Comment

                      • dudds
                        Junior Member
                        • Mar 2007
                        • 16

                        #12
                        Mark I tried statically linking the libraries?? with the following command:

                        ./configure --enable-server --enable-static --with-mysql --with-net-snmp

                        I now get past the previous error but get the following:

                        checking for net-snmp-config... /usr/bin/net-snmp-config
                        checking for main in -lcrypto ... yes
                        checking for main in -lelf ... no
                        configure: error: Not found elf library

                        I noticed that the -lelf was a difference in the output of the net-snmp-config command that I was getting. Is there another package that I need to install?? I see that I have some RPMs with elf in the name that I'll try to install and see what happens.

                        elfutils-0.97-5.i386.rpm
                        elfutils-devel-0.97-5.i386.rpm
                        elfutils-libelf-0.97-5.i386.rpm
                        elfutils-libelf-devel-0.97-5.i386.rpm

                        Cheers,
                        David

                        Comment

                        • dudds
                          Junior Member
                          • Mar 2007
                          • 16

                          #13
                          actually elfutils-libelf-0.97-5 and elfutils-0.97-5 are already installed.

                          Comment

                          • dudds
                            Junior Member
                            • Mar 2007
                            • 16

                            #14
                            Mark you little beauty!!! That did the trick mate thanks heaps for putting me on the right track. It was a combination of your editing the configure script and also installing the elfutils-devel-0.97-5.i386.rpm and elfutils-libelf-devel-0.97-5.i386.rpm packages.

                            Cheers,
                            David

                            Comment

                            • markpr
                              Member
                              • Sep 2005
                              • 31

                              #15
                              Glad you got it all running !

                              This is still a workaround (hack) and haven't really nailed down what is causing the problem in the first place. You'll just have to remember these steps for each new release of Zabbix until someone identifies the cause. I haven't figured it out to submit a bug report yet.

                              Alex and the Zabbix's team work here is really good but as you spend more time building software from source you'll get more and more practice working through issues like these.. many times more difficult.

                              Good luck with Zabbix !

                              Mark

                              Comment

                              Working...