2015-06-22 175 views
-2

我正在嘗試爲Raspberry Pi獲取nmap,並且遇到錯誤。我遵循這裏的說明: http://nmap.org/book/inst-linux.html#inst-debianRaspberry Pi無法安裝Nmap,失敗的依賴關係

我已經安裝了外星人。下一個命令是

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

但我得到這個錯誤:

[email protected] ~ $ 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的版本是:

[email protected] ~ $ python --version 
    Python 2.7.3 

這是怎麼回事?

+2

試試'apt-get install nmap'。 – duskwuff

+0

謝謝,這工作! – Nick

回答

2

只是爲了說明問題:

您已經使用了錯誤的下載:

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. ,或者如果你需要一個版本里沒有包從源代碼編譯。