Ubuntu apt-cache命令查找可用软件包

在Ubuntu上大家一般使用apt-get安装软件,如果想查找某一包软件仓库中是否有,并不是使用apt-get search或apt-get –list,而使用apt-cache命令。


apt-cache search string    //在源软件列表中查找相应的软件包

apt-cache depends string   //查找相应的软件包依赖哪些包
apt-get rdepends string    //查找哪些包依赖相应的软件包



下面我以fping这个软件包为例,fping可以使用 round-robin方式ping,非常强大。


#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是必需的。


转自 http://blog.51osos.com/linux/ubuntu-apt-cache-search-package/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值