本文GoFace给大家讲解下在Ubuntu及相同包管理的linux系统下如何查找可用软件包。在Ubuntu上大家一般使用apt-get安装软件,如果想查找某一包软件仓库中是否有,并不是使用apt-get search或apt-get –list,而使用apt-cache命令。 apt-cache search string //在源软件列表中查找相应的软件包 下面我以fping这个软件包为例,fping可以使用 round-robin方式ping,非常强大,GoFace会在下一篇博客中介绍.fping默认系统并不自带。 #apt-cache search fping fping - sends ICMP ECHO_REQUEST packets to network hosts oping - sends ICMP_ECHO requests to network hosts #apt-cache search fping Package: fping Priority: optional ……. Description: sends ICMP ECHO_REQUEST packets to network hosts fping is a ping like program which uses the Internet Control Message Protocol (ICMP) echo request to determine if a target host is responding. fping differs from ping in that you can specify any number of targets on the command line, or specify a file containing the lists of targets to ping. Instead of sending to one target until it times out or replies, fping will send out a ping packet and move on to the next target in a round-robin fashion. Homepage: http://fping.sourceforge.net/ #apt-cache depends fping //查找fping依赖哪些包 Depends: libc6 Conflicts: <suidmanager> Replaces: <netstd> #apt-get rdepends fping //查找哪些包依赖fping Reverse Depends: mplayer dvdrip zabbix-server-pgsql zabbix-server-mysql zabbix-proxy-pgsql zabbix-proxy-mysql whereami …… 只有depends才能确定真正的依赖性,反向的依赖性不一定可靠。Depends开头的是必须安装的,Recommends不是必需的。如fping并不是mplayer是必需的。 #apt-cache depends mplayer 其中Suggests:fping 说明fping对mplayer并是必需的。 #apt-cache depends zabbix-server-mysql 结果显示fping是Depends,说明fping对 zabbix-server-mysql是必需的。
另外apt-get install package时以Depends或是Recommends开头的行中的包都将被安装,而以Suggests开头的行中的包不会被安装。 |