Results 1 to 10 of 10

Thread: Error installing NMAP

  1. #1
    Join Date
    Jul 2013
    Beans
    5

    Error installing NMAP

    Let me start off by saying I am as new is gets to Linux. I have 12.04 running in a Hyper-V VM and everything seems to be working fine. I am trying to install NMAP using the steps below but when I get to the "make" command...it terminates in the errors below. Being new to Linux...I have no idea what is wrong:

    Commands executed to install NMAP:
    mkdir ~/Development
    cd ~/Development
    svn co https://svn.nmap.org/nmap
    cd nmap
    ./configure
    make
    sudo make install
    make clean

    Errors generated:

    gcc -o test/addrset -g -O2 -Wall -Wall test/addrset.o ncat_core.o sys_wrap.o util.o ncat_posix.o ncat_lua.o -ldl -lssl -lcrypto -ldl ../nsock/src/libnsock.a ../nbase/libnbase.a -lssl -lcrypto -lpcap ./../liblua/liblua.a -lm

    /usr/bin/ld: ./../liblua/liblua.a(loadlib.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5'

    /usr/bin/ld: note: 'dlcose@@GLIBC_2.2.5' is defined in DSO /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/libdl.so so try adding it to the linker command line

    /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/libdl.so: could not read symbols: Invalid operation

    collect2: Id returned 1 exit status

    make[1]: *** [test/addrset] Error 1

    make[1]: Leaving directory '/home/Phydeauxman/Development/nmap/ncat'

    make[1]: *** [ncat_build] Error 2

  2. #2
    Join Date
    Apr 2012
    Beans
    5,053

    Re: Error installing NMAP

    Hello and welcome to the forum

    Before we try to address the linker error specifically, is there any particular reason you are trying to install nmap from source? you can install the binary package from the standard repository, via a package manager tool or using apt-get

    Code:
    sudo apt-get install nmap

  3. #3
    Join Date
    Jul 2007
    Location
    Magic City of the Plains
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

  4. #4
    Join Date
    Jul 2013
    Beans
    5

    Re: Error installing NMAP

    Quote Originally Posted by steeldriver View Post
    Hello and welcome to the forum

    Before we try to address the linker error specifically, is there any particular reason you are trying to install nmap from source? you can install the binary package from the standard repository, via a package manager tool or using apt-get

    Code:
    sudo apt-get install nmap
    The reason is...is because I found that process online and was trying it. I am about as new as possible to Linux, have never used Unix, have lived entire life in Windows and am engrained with the commands used in the PowerShell/Windows command shell. I have to learn from scratch with Linux. The command you provided me worked great...thanks for the quick reply and the help.

  5. #5
    Join Date
    Sep 2006
    Beans
    7,193
    Distro
    Lubuntu Development Release

    gui for nmap

    There is a graphical way of installing programs, too, using The Software Center or Synaptic. Myself, I prefer apt-get.

    About nmap, there is also a graphical front end for it called zenmap. It can be installed the same way as nmap was.

  6. #6
    Join Date
    Apr 2012
    Beans
    5,053

    Re: Error installing NMAP

    Well just in case someone stumbles across this thread and really does need to build from source, the problem seems to be limited to the sub-build of the ncat binary - so if you don't need that then just configure the build without it

    Code:
    ./configure --without-ncat
    For anyone who needs ncat, the actual issue seems to be library link order - although libdl.so gets linked twice, neither instance is in the right place to resolve the dependencies of liblua.a

    Code:
    gcc -o test/test-uri -g -O2 -Wall -Wall -L../libpcap  test/test-uri.o base64.o http.o ncat_core.o sys_wrap.o util.o ncat_posix.o ncat_lua.o \
     -ldl -lssl -lcrypto -ldl  ../nsock/src/libnsock.a ../nbase/libnbase.a -lssl -lcrypto -lpcap ./../liblua/liblua.a -lm
    /usr/bin/ld: ./../liblua/liblua.a(loadlib.o): undefined reference to symbol 'dlopen@@GLIBC_2.1'
    As a quick and dirty fix, adding an extra -ldl to the RHS of liblua.a allows it to resolve (you'd need to do that for each target in ncat - or fix the makefile to correct the library order)
    Code:
    $ gcc -o test/test-uri -g -O2 -Wall -Wall -L../libpcap  test/test-uri.o base64.o http.o ncat_core.o sys_wrap.o util.o ncat_posix.o ncat_lua.o \
    -ldl -lssl -lcrypto -ldl  ../nsock/src/libnsock.a ../nbase/libnbase.a -lssl -lcrypto -lpcap ./../liblua/liblua.a -ldl -lm

  7. #7
    Join Date
    Jul 2013
    Beans
    5

    Re: gui for nmap

    Quote Originally Posted by Lars Noodén View Post
    There is a graphical way of installing programs, too, using The Software Center or Synaptic. Myself, I prefer apt-get.

    About nmap, there is also a graphical front end for it called zenmap. It can be installed the same way as nmap was.
    Thanks for taking time to provide the tip

  8. #8
    Join Date
    Jun 2007
    Beans
    3

    Re: Error installing NMAP

    HI there, in need that ncat binary, and note that nmap doesnt work with scripts with the package install (apt-get) so need to compile from source. Please can you help clarify where in the make file i need to add the liblua.a -ldl, after doing a scan of the Makefile, and adding to the places i see fit it still will not make after a configure. Many thanks. I am using precise server, Ubuntu 12.04.3 LTS.

  9. #9
    Join Date
    Apr 2012
    Beans
    5,053

    Re: Error installing NMAP

    You can either edit the LUA_LIBS definition in the ncat/Makefile, or just pass the modified def to 'make' from the command line

    Code:
    steeldriver@lap-t61p:~/src/nmap$ cd ncat
    steeldriver@lap-t61p:~/src/nmap/ncat$ make "LUA_LIBS=../liblua/liblua.a -ldl -lm"

  10. #10
    Join Date
    Jun 2007
    Beans
    3

    Re: Error installing NMAP

    Thank you so much! that worked out for me very well, but just for my own sanity please can you help me understand what the -ldl is; because running strace showed the command without the -ldl. And can you give me any thoughts on how i can keep this packet updated? Thanks.

    for those they may want to know what my final path to success was in creating my own DEB install file from the download of source to install on 12.04 please see below...

    http://nmap.org/dist/?C=M&O=D
    http://nmap.org/dist/nmap-6.40.tar.bz2

    code:
    Code:
    wget http://nmap.org/dist/nmap-6.40.tar.bz2
    tar -jxvf nmap-6.40.tar.bz2
    cd nmap-6.40
    ./configure
    make "LUA_LIBS=../liblua/liblua.a -ldl -lm"
    sudo checkinstall
    sudo dpkg -i nmap_6.40-1_amd64.deb
    Last edited by moonoiuk; September 3rd, 2013 at 11:25 AM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •