如何在Ubuntu,Fedora,Redhat,SUSE Linux上安装Nmap 7(2)

linuxidc@linuxidc:~/www.linuxidc.com/nmap-7.80$ ./configure
checking whether NLS is requested... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for inline... inline
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking for g++... g++

如何在Ubuntu,Fedora,Redhat,SUSE Linux上安装Nmap 7.80

这一步最后提示:

错误提示

configure: error: Neither flex nor lex was found.
configure: error: ./configure failed for libpcap

如何在Ubuntu,Fedora,Redhat,SUSE Linux上安装Nmap 7.80

解决方法如下:

linuxidc@linuxidc:~/www.linuxidc.com/nmap-7.80$ sudo apt install flex bison
[sudo] linuxidc 的密码:
正在读取软件包列表... 完成
正在分析软件包的依赖关系树     
正在读取状态信息... 完成     
下列软件包是自动安装的并且现在不需要了:
  libllvm7 Python-appindicator
使用'sudo apt autoremove'来卸载它(它们)。
将会同时安装下列软件:
  libbison-dev libfl-dev libfl2
建议安装:
  bison-doc flex-doc
下列【新】软件包将被安装:
  bison flex libbison-dev libfl-dev libfl2
升级了 0 个软件包,新安装了 5 个软件包,要卸载 0 个软件包,有 65 个软件包未被升级。
需要下载 938 kB 的归档。
解压缩后会消耗 2,925 kB 的额外空间。
您希望继续执行吗? [Y/n]

如何在Ubuntu,Fedora,Redhat,SUSE Linux上安装Nmap 7.80

然后重新./configure,正确无误后最后出现如下图所示:

...... config.status: creating Makefile config.status: creating config.h . . \`-"'"-'/ } 6 6 { ==. Y ,== /^^^\ . / \ ) Ncat: A modern interpretation of classic Netcat ( )-( )/ -""---""--- / / Ncat \_/ ( ____ \_.=|____E Configuration complete. :================: /||# nmap -A _ || / || || | || || \ || || ================== ........... / \............. :\ ############ \ : --------------------------------- : | * |__________|| :::::::::: | \ | | || ....... | --------------------------------- 8 NMAP IS A POWERFUL TOOL -- USE CAREFULLY AND RESPONSIBLY Configured with: ndiff zenmap nping openssl zlib libssh2 lua ncat Configured without: localdirs nmap-update Type make (or gmake on some *BSD machines) to compile.

如何在Ubuntu,Fedora,Redhat,SUSE Linux上安装Nmap 7.80

然后开始 make

linuxidc@linuxidc:~/www.linuxidc.com/nmap-7.80$ make
Compiling libnetutil
cd libnetutil && make
make[1]: 进入目录“/home/linuxidc/www.linuxidc.com/nmap-7.80/libnetutil”
g++ -c -I../liblinear -I../liblua -I../libdnet-stripped/include -I../libssh2/include  -I../libpcap -I../nbase -I../nsock/include -DHAVE_CONFIG_H -D_FORTIFY_SOURCE=2 -g -O2 -Wall -fno-strict-aliasing netutil.cc -o netutil.o
g++ -c -I../liblinear -I../liblua -I../libdnet-stripped/include -I../libssh2/include  -I../libpcap -I../nbase -I../nsock/include -DHAVE_CONFIG_H -D_FORTIFY_SOURCE=2 -g -O2 -Wall -fno-strict-aliasing PacketElement.cc -o PacketElement.o
g++ -c -I../liblinear -I../liblua -I../libdnet-stripped/include -I../libssh2/include  -I../libpcap -I../nbase -I../nsock/include -DHAVE_CONFIG_H -D_FORTIFY_SOURCE=2 -g -O2 -Wall -fno-strict-aliasing NetworkLayerElement.cc -o NetworkLayerElement.o

......

如何在Ubuntu,Fedora,Redhat,SUSE Linux上安装Nmap 7.80

最后

sudo su
make install

查看版本:

nmap -v

如何在Ubuntu,Fedora,Redhat,SUSE Linux上安装Nmap 7.80

Nmap 7.80 发布,新的Npcap Windows数据包捕获驱动  https://www.linuxidc.com/Linux/2019-08/160067.htm

Linux公社的RSS地址https://www.linuxidc.com/rssFeed.aspx

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/11807.html