且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Cygwin当前的完整安装大小是多少?

更新时间:2023-11-08 14:59:10

p>完整的Cygwin安装范围可以从17到114 GiB,取决于你如何定义full。



你的100 MB数字告诉我你刚刚点击由Cygwin的 setup - *。exe 程序提供的默认值,因为它只安装基本软件包集合,目前共有101个MiB。 Cygwin遵循现代的网络连接软件分发模型:它假定你可以再次运行 setup - *。exe ,并根据需要选择新软件包。



Cygwin维护者尝试将Base类别的软件包设置为小于实用.¹Cygwin Base安装给你一个很像旧式Unix安装的东西,它只包含了,并且安装每个最后一个软件包需要64.7 GiB的磁盘安装树的空间,以及下载树的13.5 GiB。总共磁盘空间大小为78.2  GiB。



所有未使用的软件都带有几个成本。即使磁盘空间,下载时间,安装时间和本地带宽使用对您没有影响,也可以考虑使用慷慨的免费镜子浪费了带宽。



我已经做了实验,所以现在你不必。



智能完成安装



我提出了一套简单的包排除规则,节省了相当多的磁盘空间,安装时间,和带宽:

  1. 跳过所有 -debuginfo 包。很少有人需要这些,并且他们占用了很多的空间。 储存:44.1  GiB



    这项规则很容易套用。在选择所有要安装的软件包之后,再移至下一屏幕之前,请单击调试类别标题旁边的安装文本,直到切换回默认。



    (或者如果您已经安装了它们,请点击它,直到它显示为卸载。)


  2. 交叉编译器和关联包。同样,很少有人需要这些。 储存:4.6  GiB



    Cygwin基本上有两套交叉开发工具:用于创建Cygwin可执行文件字词大小(即用于32位Cygwin的64位工具和库,或者反之亦然)以及用于构建与您的Cygwin安装相同字大小的 MinGW 可执行文件的集合。 p>

    要将此规则应用于64位Cygwin安装,同时仍在选择包屏幕上,单击查看按钮,直到模式切换到待定。然后在搜索框中键入 cygwin32 - ,并在新建列中单击每个包的版本号,直到切换回跳过。然后重复 mingw64 -



    为了做到32位Cygwin,


  3. li>

    不要显式安装任何 lib * 包。让Cygwin的 setup - *。exe 自动安装库以满足包依赖关系。 节省:约1.5  GiB   6



    要应用此规则,请将Libs类别切换为 ,就像你对调试类别一样。


按照这个规则集,我是



平静下来



我们可以排除其他一些臭名昭着的磁盘池,使安装更小:




  • X11 ,桌面环境和GUI应用程序一起需要约5个GiB


  • 所有 -doc 套件结合了约4 GB的磁盘空间


  • 完全的仅英语TeX安装在Cygwin上需要大约1个GiB。


  • 所有的Devel类别软件包一起占用另外3 GB左右的

    / li>


有人不是软件开发人员,不使用Cygwin作为GUI东西,谁使用Web作为文档,不使用TeX创建文档,因此只能在大约4-7 GiB上安装完整Cygwin。



如果您使用Cygwin的方式要使用,安装基地,只有你需要的额外的包,你可能甚至不会得到你的安装大小,甚至这些水平。我使用Cygwin这种方式,我的安装通常都在1个GiB以下,但他们是完整的,因为他们满足我目前的需求。



Add in Cygwin Ports?



目前在 Cygwin Ports .7



如果使用上面的智能规则集,添加Cygwin Ports存储库会使总安装大小为22.5 GiB。



如果您跳过排除规则并安装来自Cygwin和Cygwin Ports的绝对一切,则总安装大小将跳转到94.1  GiB,而您的下载树



对于额外的磁盘填充乐趣...



所有这些测试都是使用64位版本的Cygwin和Cygwin Ports完成的。



一个64位系统,您可以通过安装并行8 32位Cygwin安装大致加倍上述空间要求。这不是毫无意义的。

/ p>


  1. Cygwin邮件列表上偶尔有线程,有人认为一些非常常见的包应该包含在Base类别中,例如作为Perl,结果通常是维护者决定不将它添加到Base。



    你也偶尔看到相反的情况:一些包意外滑入Base,通常通过一个不正确的依赖。在问题引起Cygwin维护者的注意后不久,恢复了状态。 (示例


  2. 也许我错了。



    视力受损 捷克语移民音乐家谁完成美国***软件开发合同,而不忙于刷他的技术印地语词汇表,通过翻译电气工程 报告进入他采用的中文



    我想见他。他听起来像一个有趣的家伙。



    此外,我想我可以帮助他的计划,创建一个 Tcl / Tk GUI前端 Orpie 。当然,我会尽量让他从 Ocaml 移植到 C ++ / Qt



    我的意思是,Tcl / Tk,真的吗?在 2016年


  3. curl -s https://cygwin.com/packages/package_list.html | grep -c x86_64 /


  4. Cygwin的设置 - *。exe 不要在安装后删除下载的软件包文件。这在您有多个Cygwin安装的站点很有用,因为您可以将下载目录放在共享网络驱动器上。



    如果你把下载目录放在你安装Cygwin的同一个驱动器上,并保持下载树,您得到我的78.2  GiB上限值:64.7  GiB  +  13.5  GiB。



    顺序,磁盘空间数字:文件系统开销将显着增加安装树的大小,因为小文件的比例远远大于下载树中的大小,确切的增量将取决于文件系统的详细信息,但+ 5%是一个很好的第一近似。 )



    设置 - *。exe 不会在安装后删除下载的包文件,自动清除旧版本,所以您的下载树在您使用Cygwin的岁月中增长和增长。 (有关于网络的脚本可以解决这个问题,例如 this one 。)


  5. 几乎所有需要Cygwin交叉编译器的人都是维护Cygwin软件包的人,因为维护者需要为32位和64位Cygwin,除非有很好的理由不要。



    可能有更多的人为MinGW交叉开发工具提供了良好的理由,但也有使用MinGW和MSYS而不是Cygwin的选项。另外,我猜想做双栈Cygwin + MinGW开发的人数小于使用其中一种或另一种的人群。


  6. 您可能会想知道为什么Cygwin软件包存储库中存在您不需要的库,即使您已经安装了all软件包。有以下几个原因:




    • 有些库已过时,但仍然显示在镜子上


    • 有些图书馆有多种替代形式,因此知道他们需要非默认图书的人可以选择。




  7. 有些图书馆只能为自己编写程序而不支持任何现有的Cygwin包 curl -s ftp://sourceware.org/pub/cygwinports/portslist.txt | grep -c - -



    如果你还记得以前版本的这个答案,Cygwin Ports比Cygwin官方更多的包存储库,更改是因为 Yaakov Selkowitz加入红帽,并开始将其包移动


  8. 为什么要分开?因为32位和64位Cygwins 基本上不兼容



Every source I found online says a full installation of Cygwin takes over 1 GB, but mine is only 100 MB. I was pretty sure I downloaded everything from the mirror servers, but the install took less than 5 minutes to complete instead of hours, as I'd expect if it were installing gigabytes of software.

Did Cygwin get a huge clean-up during 2012~2013, or did I do something wrong in the installation?

A full Cygwin installation can range from 17 to 114 GiB, depending on how you define "full."

Your 100 MB number tells me that you just clicked through the defaults presented by Cygwin's setup-*.exe program, because that installs only the Base package set, which currently amounts to 101 MiB. Cygwin follows the modern net-connected software distribution model: it assumes you can just run setup-*.exe again and select new packages as you need them. It's normal to start with that 0.1 GiB base installation, then add packages as you need them.

The Cygwin maintainers try to keep the Base category's package set as small as practical.¹ A Cygwin Base install gives you something much like an old-style Unix installation, covering little more than what POSIX specifies.

So How Do You Get a Full Installation?

The Cygwin installer does not have an obvious way to get a "full" installation, on purpose, because no one needs literally every package in the Cygwin repository.²

There is, however, a sneaky way to install everything. At the package selection screen...

...click the "Default" text to the right of the "All" group header. It will change to "Install," as will the corresponding text in all of the groups underneath it. This marks everything for installation.

I include this tip for completeness only. You do not want to do this! It will install gigs and gigs of stuff you will never use. Currently, there are 8,305 packages in Cygwin,³ and installing every last one of them takes 64.7 GiB of disk space for the installation tree, plus 13.5 GiB for the download tree.⁴ That comes to 78.2 GiB of total disk space.

All that unused software carries several costs. Even if disk space, download time, installation time, and local bandwidth use are of no consequence to you, consider the the generous free mirror's wasted bandwidth.

I've done the experiment, so now you don't have to.

An Intelligent "Complete" Installation

I've come up with a simple set of package exclusion rules that saves quite a bit of disk space, installation time, and bandwidth:

  1. Skip all of the -debuginfo packages. Few people need these, and they take up a lot of space. Savings: 44.1 GiB

    It's easy to apply this rule. After selecting all packages for installation with the sneaky trick above but before you move on to the next screen, click the "Install" text next to the "Debug" category header until it switches back to "Default."

    (Or if you've already installed them, click it until it says "Uninstall" instead.)

  2. Skip the cross-compilers and associated packages. Again, few people⁵ need these. Savings: 4.6 GiB

    There are basically two sets of cross-development tools in Cygwin: the set for creating Cygwin executables of the other word size (i.e. 64-bit tools and libraries for 32-bit Cygwin, or vice versa) and the set for building MinGW executables of the same word size as your Cygwin installation.

    To apply this rule for a 64-bit Cygwin installation, while still on the "Select Packages" screen, click the View button until the mode switches to "Pending." Then type cygwin32- into the search box, and click the version number for each package in the "New" column until it switches back to "Skip." Then repeat that for mingw64-.

    To do it for 32-bit Cygwin, the idea is the same except that you search for cygwin64- and mingw32- instead.

  3. Do not explicitly install any of the lib* packages. Let Cygwin's setup-*.exe automatically install libraries to satisfy package dependencies. Savings: about 1.5 GiB ⁶

    To apply this rule, switch the "Libs" category to "Default" or "Uninstall" as you did with the "Debug" category. The installer will figure out which libraries you actually need in a later step.

By following this rule set, I was able to install nearly everything, taking "only" about 17 GiB.

Paring That Down

We can get the installation to be even smaller by excluding several other notorious disk hogs:

  • X11, the desktop environments, and the GUI apps together require about 5 GiB

  • All of the -doc packages combined chew up about 4 GiB of disk space

  • A full English-only TeX installation takes about 1 GiB on Cygwin. Adding in all the other language support packages doubles the space requirement.

  • All of the Devel category packages together take another 3 GiB or so

Someone who isn't a software developer, who doesn't use Cygwin for GUI stuff, who uses the Web for docs, and who doesn't use TeX for document creation could thus have a "full" Cygwin installation in only about 4-7 GiB.

If you use Cygwin the way it is intended to be used, installing the base and only the extra packages you need at the moment, you probably won't even get your installation size to even those levels. I use Cygwin this way, and my installations are typically well under 1 GiB, yet they are "complete," in that they meet my current needs.

What If You Add In Cygwin Ports?

There are currently 3,409 packages in Cygwin Ports.⁷

If you use my "intelligent" rule set above, adding the Cygwin Ports repository brings the total installed size to 22.5 GiB.

If you skip the exclusion rules and install absolutely everything from both Cygwin and Cygwin Ports, the total installed size jumps to 94.1 GiB, and your download tree grows to 20.1 GiB, for a grand total of 114 GiB.

For Extra Disk-Filling Fun...

All of this testing was done with the 64-bit versions of Cygwin and Cygwin Ports.

If you're on a 64-bit system, you can roughly double the above space requirements by installing a parallel⁸ 32-bit Cygwin installation. This is not pointless. It is a viable alternative to using cross-compilers, for one thing.


Footnotes

  1. There are occasional threads on the Cygwin mailing list where someone argues that some very common package should be included in the Base category, such as Perl, and the result is usually that the maintainers decide not to add it to Base.

    You also occasionally see the opposite: some package accidentally slips into Base, usually via an incorrect dependency. Shortly after the problem is brought to the attention of the Cygwin maintainers, the status quo ante is restored. (example)

  2. Perhaps I am wrong.

    There could be a vision-impaired Czech immigrant musician who completes US government software development contracts on the side while not busy brushing up on his technical Hindi vocabulary by translating electrical engineering reports into his adopted Mandarin.

    I want to meet him. He sounds like an interesting guy.

    Plus, I think I can help him with his plan to create a Tcl/Tk GUI front end for Orpie. Naturally, I will try to talk him into porting it from Ocaml to C++/Qt.

    I mean, Tcl/Tk, seriously? In 2016? Let's not be ridiculous.

  3. curl -s https://cygwin.com/packages/package_list.html | grep -c x86_64/

  4. Cygwin's setup-*.exe doesn't delete the downloaded package files after installing them. This is useful at sites where you have multiple Cygwin installations, since you can put the download directory on a shared network drive. Each package then only has to be downloaded once at that site.

    If instead you put the download directory on the same drive that you're installing Cygwin on and keep the download tree, you get my 78.2 GiB upper limit value above: 64.7 GiB + 13.5 GiB.

    (All sizes in this answer are space-on-the-wire numbers, by the way, not space-on-disk numbers: file system overhead will increase the size of the installation tree significantly, since the proportion of small files is much greater than in the download tree. The exact delta will depend on the file system details, but +5% is a good first approximation.)

    Not only does setup-*.exe not delete downloaded package files after installing them, it doesn't auto-purge old versions, so your download tree grows and grows over the years you use Cygwin. (There are scripts floating about the net to solve this problem, such as this one.)

  5. Pretty much the only people who need the Cygwin cross-compilers are the people maintaining Cygwin packages, since maintainers are expected to build for both 32-bit and 64-bit Cygwin unless there is a good reason not to.

    There are probably more people with a good justification for MinGW cross-development tools, but there's also the option of using MinGW and MSYS instead of Cygwin. Also, I am guessing that the number of people who do dual-stack Cygwin + MinGW development is smaller than the set of people who use one or the other exclusively, or nearly so.

  6. You may wonder why there are libraries in the Cygwin package repository that you don't need even though you've installed "all" packages. There are several reasons:

    • some libraries are obsolete, but are still present on the mirrors

    • some libraries come in multiple alternative forms, so that people who know they need something other than the default can choose it

    • some libraries are there only for people writing their own programs, not to support any existing Cygwin package

  7. curl -s ftp://sourceware.org/pub/cygwinports/portslist.txt | grep -c -- -

    If you remember a previous version of this answer where there were more packages in Cygwin Ports than in the official Cygwin repository, the change is because Yaakov Selkowitz joined Red Hat and began moving his packages into the main distro.

  8. Why separate? Because the 32- and 64-bit Cygwins are fundamentally incompatible.