Raspberry Pi 无法安装 Nmap,依赖项失败

Raspberry Pi cannot install Nmap, failed dependencies

我试图让 Raspberry Pi 和 运行 的 nmap 出错。我正在按照此处的说明进行操作: http://nmap.org/book/inst-linux.html#inst-debian

我安装了外星人。下一个命令是

rpm -vhU https://nmap.org/dist/nmap-6.49BETA2-1.i386.rpm

但是我得到这个错误:

pi@raspberrypi ~ $ rpm -vhU https://nmap.org/dist/nmap-6.49BETA2-1.i386.rpm
    rpm: RPM should not be used directly install RPM packages, use Alien instead!
    rpm: However assuming you know what you are doing...
    Retrieving https://nmap.org/dist/nmap-6.49BETA2-1.i386.rpm
    error: Failed dependencies:
        python >= 2.4 is needed by nmap-2:6.49BETA2-1.i386

但我的 Python 版本是:

pi@raspberrypi ~ $ python --version
    Python 2.7.3

这是怎么回事?

简单说明问题:

您一直在使用错误的下载方式:

nmap-6.49BETA2-1.i386.rpm
                      ^^^ package format for RedHat not for Debian
                 ^^^^ wrong architecture, the Rasberry pi is arm6 or arm7l

包不对,还有依赖问题。 RPM 安装程序无法正确读取 debian 已安装软件包的列表。可以通过命令行参数忽略依赖关系,但一般来说

更好
  1. 使用 debian 软件包

  2. 如果您需要一个没有包的版本,也可以从源代码编译。