Nmap 7.92 for Oracle Linux 8

Linux

bz2を展開するためのbzip2とコンパイルに必要なパッケージをインストールする。

sudo dnf -y install bzip2 gcc gcc-c++ make openssl-devel

ソースコードをダウンロードして展開する。

curl -O https://nmap.org/dist/nmap-7.92.tar.bz2
sudo cp nmap-7.92.tar.bz2 /usr/local/src/
cd /usr/local/src/
tar jxf nmap-7.92.tar.bz2
cd ./nmap-7.92/

Oracle Linux 8にはlibssh2がないのでconfigureがエラーになる。
Red Hat Enterprise Linux 8がlibssh2を削除したため。
8.2.3. RHEL 8 で libssh2 が利用できない
Oracle Linux 8だけでなく、Red Hat Enterprise Linux 8系、AlmaLinux, Rocky Linux, MIRACLE Linuxもみんないっしょ。

$ sudo ./configure --prefix=/usr/local/nmap-7.92
:
config.status: error: in `/usr/local/src/nmap-7.92/libssh2':
config.status: error: Something went wrong bootstrapping makefile fragments
    for automatic dependency tracking.  If GNU make was not used, consider
    re-running the configure script with MAKE="gmake" (or whatever is
    necessary).  You can also try re-running configure with the
    '--disable-dependency-tracking' option to at least be able to build
    the package (albeit without support for automatic dependency tracking).
See `config.log' for more details
configure: error: ./configure failed for libssh2

Red Hat Enterprise Linux 8付属のNmapもlibssh2はwithoutしているのでいらんっぽい。

$ nmap -V
Nmap version 7.70 ( https://nmap.org )
Platform: x86_64-redhat-linux-gnu
Compiled with: liblua-5.3.3 openssl-1.1.1k libpcre-8.42 libpcap-1.9.1 nmap-libdnet-1.12 ipv6
Compiled without: libssh2 libz
Available nsock engines: epoll poll select

–without-libssh2してあげればmakeできた。

sudo ./configure --prefix=/usr/local/nmap-7.92 --without-libssh2
sudo make
sudo make install
タイトルとURLをコピーしました