Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Raspberry Pi无法安装Nmap,依赖项失败_Python_Linux_Raspberry Pi_Nmap - Fatal编程技术网

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

Python Raspberry Pi无法安装Nmap,依赖项失败,python,linux,raspberry-pi,nmap,Python,Linux,Raspberry Pi,Nmap,我正在尝试获取Raspberry Pi的nmap,但遇到了错误。我遵循这里的说明: 我安装了外星人。下一个命令是 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 instal

我正在尝试获取Raspberry Pi的nmap,但遇到了错误。我遵循这里的说明:

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

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已安装软件包的列表。可以通过命令行参数忽略依赖项,但通常最好

  • 使用debian包

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


  • 尝试
    apt get install nmap
    。谢谢,这很有效!