查看Cygwin中已经安装的软件包的方法

很多时候会需要查看Cygwin中已经安装了哪些软件包以及这些软件包的版本信息。Cygwin提供了和各种Linux发行版提供的软件包管理程序(如rpm)类似的实用工具: cygcheck

 

可以使用cygcheck -h查看该工具的用法:

 

$ cygcheck -h

 

Usage: cygcheck [-v] [-h] PROGRAM
       cygcheck -c [-d] [PACKAGE]
       cygcheck -s [-r] [-v] [-h]
       cygcheck -k
       cygcheck -f FILE [FILE]...
       cygcheck -l [PACKAGE]...
       cygcheck -p REGEXP
       cygcheck --delete-orphaned-installation-keys
       cygcheck --enable-unique-object-names Cygwin-DLL
       cygcheck --disable-unique-object-names Cygwin-DLL
       cygcheck --show-unique-object-names Cygwin-DLL
       cygcheck -h

List system information, check installed packages, or query package database.

At least one command option or a PROGRAM is required, as shown above.

  PROGRAM              list library (DLL) dependencies of PROGRAM
  -c, --check-setup    show installed version of PACKAGE and verify integrity
                       (or for all installed packages if none specified)
  -d, --dump-only      just list packages, do not verify (with -c)
  -s, --sysinfo        produce diagnostic system information (implies -c -d)
  -r, --registry       also scan registry for Cygwin settings (with -s)
  -k, --keycheck       perform a keyboard check session (must be run from a
                       plain console only, not from a pty/rxvt/xterm)
  -f, --find-package   find the package to which FILE belongs
  -l, --list-package   list contents of PACKAGE (or all packages if none given)
  -p, --package-query  search for REGEXP in the entire cygwin.com package
                       repository (requires internet connectivity)
  --delete-orphaned-installation-keys
                       Delete installation keys of old, now unused
                       installations from the registry.  Requires the right
                       to change the registry.
  --enable-unique-object-names Cygwin-DLL
  --disable-unique-object-names Cygwin-DLL
  --show-unique-object-names Cygwin-DLL
                       Enable, disable, or show the setting of the
                       "unique object names" setting in the Cygwin DLL
                       given as argument to this option.  The DLL path must
                       be given as valid Windows(!) path.
                       See the users guide for more information.
                       If you don't know what this means, don't change it.
  -v, --verbose        produce more verbose output
  -h, --help           annotate output with explanatory comments when given
                       with another command, otherwise print this help
  -V, --version        print the version of cygcheck and exit

Note: -c, -f, and -l only report on packages that are currently installed. To
  search all official Cygwin packages use -p instead.  The -p REGEXP matches
  package names, descriptions, and names of files/paths within all packages.

可以发现使用cygcheck -c -d查看本地已经安装的所有软件包。如果要查找某个软件包是否已经安装及版本信息的话,可以使用cygcheck -c -d | grep regexp,其中regexp是用于匹配软件包名字的正则表达式。例如:


$ cygcheck -c -d | grep lib

libattr1                       2.4.43-1
libbz2_1                       1.0.5-10
libcairo2                      1.8.8-1
libcloog0                      0.15.7-1
libdb4.5                       4.5.20.2-2
libexpat0                      1.95.8-2
libexpat1                      2.0.1-1
libexpat1-devel                2.0.1-1
libfontconfig1                 2.8.0-1
libfontenc1                    1.0.5-1
libfreetype6                   2.3.12-1
libgcc1                        4.3.4-3
libgcrypt11                    1.4.5-1
libgdbm4                       1.8.3-20
libgif4                        4.1.6-10
libGL1                         7.6.1-1
libglitz1                      0.5.6-10
libgmp3                        4.3.1-3
libgmpxx4                      4.3.1-3
libgpg-error0                  1.7-1
libgs8                         8.63-2
libICE6                        1.0.6-1
libiconv2                      1.13.1-1
libintl3                       0.14.5-1
libintl8                       0.17-11
libjasper1                     1.900.1-1
libjbig2                       2.0-11
libjpeg62                      6b-21
libjpeg7                       7-10
liblzma1                       4.999.9beta-11
libmpc1                        0.8-1
libmpfr1                       2.4.1-4
libncurses10                   5.7-18
libncurses7                    5.3-4
libncurses8                    5.5-10
libncurses9                    5.7-16
libpcre0                       8.00-1
libpixman1_0                   0.18.0-1
libpng12                       1.2.35-10
libpopt0                       1.6.4-4
libppl                         0.10.2-1
libreadline7                   6.0.3-2
libsigsegv2                    2.8-1
libSM6                         1.1.1-1
libssp0                        4.3.4-3
libstdc++6                     4.3.4-3
libtiff5                       3.9.2-1
libX11_6                       1.3.3-1
libXau6                        1.0.5-1
libXaw3d7                      1.5D-8
libXaw7                        1.0.7-1
libxcb-render-util0            0.3.6-1
libxcb-render0                 1.5-1
libxcb1                        1.5-1
libXdmcp6                      1.0.3-1
libXext6                       1.1.1-1
libXft2                        2.1.14-1
libxkbfile1                    1.0.6-1
libXm2                         0.95.2-2
libXmu6                        1.0.5-1
libXmuu1                       1.0.5-1
libXpm4                        3.5.8-1
libXrender1                    0.9.5-1
libXt6                         1.0.8-1
zlib                           1.2.3-10
zlib-devel                     1.2.3-10
zlib0                          1.2.3-10

如果要查询整个cygwin.com网站上软件包仓库的软件包,可以使用cygcheck -p regexp(需要使用网络连接)。例如:

$ cygcheck -p gcc


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值