1.使用setup,然后一路安装到select package,选择需要的包即可,然后一路next。

2.setup.exe -q -P 包名, 详细用法如下:

Command Line Options:
-A --disable-buggy-antivirus Disable known or suspected buggy anti
virus software packages during execution.
-C --categories Specify entire categories to install
-D --download Download from internet
-d --no-desktop Disable creation of desktop shortcut
-h --help print help
-K --pubkey Path to extra public key file (gpg format)
-L --local-install Install from local directory
-l --local-package-dir Local package directory
-n --no-shortcuts Disable creation of desktop and start menu
shortcuts
-N --no-startmenu Disable creation of start menu shortcut
-O --only-site Ignore all sites except for -s
-P --packages Specify packages to install
-p --proxy HTTP/FTP proxy (host:port)
-q --quiet-mode Unattended setup mode
-r --no-replaceonreboot Disable replacing in-use files on next
reboot.
-R --root Root installation directory
-S --sexpr-pubkey Extra public key in s-expr format
-s --site Download site
-U --keep-untrusted-keys Use untrusted keys and retain all
-u --untrusted-keys Use untrusted keys from last-extrakeys
-X --no-verify Don't verify setup.ini signatures

3.在cygwin上安装wget

4.在cygwin上安装apt-cyg(https://www.fir3net.com/UNIX/Linux/cygwin-package-installation.html)

(1)使用cygwin-setup下载并安装必要的工具:

C:\Windows\System32>C:\Users\admin\Downloads\setup.exe -q -P wget,tar,qawk,bzip2,subversion,vim

(2)下载并安装apt-cyg

$ svn --force export http://apt-cyg.googlecode.com/svn/trunk/ /bin/
$ chmod +x /bin/apt-cyg

(3)apt-cyg语法 

"apt-cyg install <package names>" to install packages
"apt-cyg remove <package names>" to remove packages
"apt-cyg update" to update setup.ini
"apt-cyg show" to show installed packages
"apt-cyg find <pattern(s)>" to find packages matching patterns
"apt-cyg describe <pattern(s)>" to describe packages matching patterns
"apt-cyg packageof <commands or files>" to locate parent packages

(4) 举例

$ apt-cyg install rsync
Working directory is /setup
Mirror is ftp://mirror.mcs.anl.gov/pub/cygwin
--2011-05-09 06:44:24-- ftp://mirror.mcs.anl.gov/pub/cygwin/setup.bz2
=> `.listing'
Resolving mirror.mcs.anl.gov (mirror.mcs.anl.gov)... 2620:0:dc0:1800:214:4fff:fe7d:1b9, 146.137.96.15, 146.137.96.7
Connecting to mirror.mcs.anl.gov (mirror.mcs.anl.gov)|2620:0:dc0:1800:214:4fff:fe7d:1b9|:21... failed: Connection timed out.
Connecting to mirror.mcs.anl.gov (mirror.mcs.anl.gov)|146.137.96.15|:21... connected. !! Output Omitted !! 2011-05-09 06:45:16 (131 KB/s) - `rsync-3.0.8-1.tar.bz2' saved [272248] Unpacking...
Package rsync requires the following packages, installing:
libgcc1 libiconv2 libpopt0 cygwin
Package libgcc1 is already installed, skipping
Package libiconv2 is already installed, skipping
Package libpopt0 is already installed, skipping
Package cygwin is already installed, skipping
Package rsync installed

5.查找包是否存在:cygcheck

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.

6. 官方帮助地址:

https://cygwin.com/faq.html#faq.setup

https://cygwin.com/cygwin-ug-net/using-utils.html#cygcheck

cygwin 扩展的更多相关文章

  1. 使用Cygwin在Windows上体验Linux的快感

    前言 记得大学的时候就以前使用过Cygwin,可惜当时没有发现她的美,我相信如今大多数朋友可能会更加倾向于使用Git或者干脆直接使用虚拟机以及原生Unix. 只是对于刚进入Linux的世界新人来说,使 ...

  2. Windows7下采用cygwin编译安装swoole扩展

    常用命令 查看cygwin当前的版本: cygcheck -c cygwin 检查所有安装软件的版本号:cygcheck -c 查看某一个软件安装的版本:cygcheck -c 软件名称 查看本地已经 ...

  3. windows下开发PHP扩展dll(无需Cygwin)

    windows下开发php扩展网上很多资料都说需要Cygwin,其实完全可以不必安装该东东.没错,是可以在linux下生成骨架后拷到windos下来用,但是,如果没有linux环境呢?什么,装虚拟机? ...

  4. windows下开发PHP扩展(无需Cygwin)

    第一步:准备 1.php源码包和windows下的二进制包,以及安装Visual C++,并把Microsoft Visual Studio/Common/MSDev98/Bin的绝对路径添加到win ...

  5. 用VS开发PHP扩展

    开发前准备工作: VS(我用的2013) Cygwin(下载地址:http://www.cygwin.com/) 搭载了php运行环境的IIS7.5 (用来测试) php编译后的程序和编译前的源码,我 ...

  6. 使用vs2008搭建php扩展环境

    所需要的工具或者文件: 1.php源码,去官网下载即可.http://windows.php.net/download 2.php-sdk:php 开发工具包 3.deps类库 4.Cygwin:wi ...

  7. C/C++ 跨平台交叉编译、静态库/动态库编译、MinGW、Cygwin、CodeBlocks使用原理及链接参数选项

    目录 . 引言 . 交叉编译 . Cygwin简介 . 静态库编译及使用 . 动态库编译及使用 . MinGW简介 . CodeBlocks简介 0. 引言 UNIX是一个注册商标,是要满足一大堆条件 ...

  8. 【转】Linux 技巧: Bash 参数和参数扩展

    重点看下清单7 现在,很多 Linux® 和 UNIX® 系统上都有 bash shell,它是 Linux 上常见的默认 shell.通过本文,您将了解到如何在 bash 脚本中处理参数和选项,以及 ...

  9. Window7 下开发php扩展

    一.首先查看phpinfo() 信息PHP Version 5.4.34Zend Extension Build     API220100525,TS,VC9 PHP Extension Build ...

随机推荐

  1. use isSubstring to check if one word is a rotation of another.

      1: /// <summary> 2: /// Assume you have a method isSubstring which checks if one word is a s ...

  2. win8下在microsoft visual studio 2012利用ODP.NET连接ORACLE 12c

    老板要求我搭个ASP.NET框架,并且连接上ORACLE数据库,听起来好像挺简单的,但就是连第一步连接ORACLE我都搞了两天╮(╯▽╰)╭ 首先,项目书上要求用ORACLE 10G,可我自己的本本装 ...

  3. xcode7下开发ios9等相关问题记录

    1.默认使用HTTPS请求如果在Xcode 9之前使用的时http请求,那么在XCode 9上编译的App是不能联网的,会提示如下错误:App Transport Security has block ...

  4. PHP面试题二

    1.抓取远程图片到本地,你会用什么函数? fsockopen, A 2.用最少的代码写一个求3值最大值的函数. function($a,$b,$c){ * W0 z* u6 k+ e. L  a: } ...

  5. ios开发所有的iCON 的大小

    新浪微博: 16x16png,80x80png,120x120png qq开放平台: 16*16png 20k以内 512*512jpg或者png 200以内 微信开放平台: 28x28 png,10 ...

  6. sso笔记

    C:\Windows\System32\drivers\etc\hosts SSO:单点登录 1.使用Cookie解决单点登录 技术点: 1.设置Cookie的路径为setPath("/&q ...

  7. Android Butterknife框架配置

    一.原理. 最近发现一个很好用的开源框架,蛮不错的,可以简化你的代码,是关于注解的.不多说直接进入使用步骤讲解. 二.步骤. 1.准备阶段,先到官网( http://jakewharton.githu ...

  8. Flume NG中的Kafka Channel

    kafka(官网地址:http://kafka.apache.org)是一款分布式消息发布和订阅的系统 在Flume中的KafkaChannel支持Flume与Kafka整合,可以将Kafka当做ch ...

  9. android自定义控件之模仿优酷菜单

    去年的优酷HD版有过这样一种菜单,如下图: 应用打开之后,先是三个弧形的三级菜单,点击实体键menu之后,这三个菜单依次旋转退出,再点击实体键menu之后,一级菜单会旋转进入,点击一级菜单,二级菜单旋 ...

  10. Android(java)学习笔记187:Android中操作XML数据(使用Pull解析器)

    1. Pull解析器的运行方式与 SAX 解析器相似.它提供了类似的事件,如:开始元素和结束元素事件,使用parser.next()可以进入下一个元素并触发相应事件.跟SAX不同的是, Pull解析器 ...