现在的位置: 首页 > 综合 > 正文

cygwin下安装软件

2018年07月17日 ⁄ 综合 ⁄ 共 1592字 ⁄ 字号 评论关闭

很多时候,我们在windows下安装完cygwin后,使用时发现装少了软件。那么怎么办?

1)有的人说用setup.exe那个玩意再搞一遍。个人比较觉得那个方法蛋疼。

2)有的人说用find命令,怎么安装之类的,也不太爽。

3)后来发现apt-cyg这个程序,真是强大啊。使用方法和ubuntu下的apt-get一样。爽死啦。

安装apt-cyg的方法如下(在cygwin中输入如下命令):

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


使用apt-cyg来安装软件:

  # apt-cyg install git-core gnupg flex bison gperf build-essential zip curl


好了开始下载android源代码吧:

新建home下的bin目录:

$ mkdir ~/bin
$ PATH=~/bin:$PATH

下载repo:

$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo

新建工程目录:

$ mkdir WORKING_DIRECTORY
$ cd WORKING_DIRECTORY

初始化仓库:

$ repo init -u https://android.googlesource.com/platform/manifest

下载文件:

$ repo sync


参考:

你要是想看看这个牛逼的软件是怎么实现的可以checkout过来看看(其实就是shell脚本。O(∩_∩)O哈哈~):

svn checkout http://apt-cyg.googlecode.com/svn/trunk/
apt-cyg-read-only

工程链接如下:

http://code.google.com/p/apt-cyg/


当然如果屌丝想看英文就看吧:

Intro

apt-cyg is a command-line installer for Cygwin which cooperates with Cygwin Setup and uses the same repository. The syntax is similar to apt-get. Usage examples:

  • "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

Quick start

First install subversion and wget through the standard cygwin setup program. Then run the following commands:

  # svn --force export http://apt-cyg.googlecode.com/svn/trunk/ /bin/
  # chmod +x /bin/apt-cyg
  • use apt-cyg, for example:
  # apt-cyg install nano
转载:http://blog.csdn.net/forlong401/article/details/8517711

抱歉!评论已关闭.