apt-get for Cygwin?

后端 未结 7 1399
说谎
说谎 2020-12-22 15:30

Is there any apt-get-like program for use with Cygwin?

I already tried cyg-apt but when I try I get this error:

cyg-apt: do         


        
7条回答
  •  攒了一身酷
    2020-12-22 15:38

    Update: you can read the more complex answer, which contains more methods and information.

    There exists a couple of scripts, which can be used as simple package managers. But as far as I know, none of them allows you to upgrade packages, because it’s not an easy task on Windows since there is not possible to overwrite files in use. So you have to close all Cygwin instances first and then you can use Cygwin’s native setup.exe (which itself does the upgrade via “replace after reboot” method, when files are in use).


    apt-cyg

    The best one for me. Simply because it’s one of the most recent. It works correctly for both platforms - x86 and x86_64. There exists a lot of forks with some additional features. For example the kou1okada fork is one of improved versions.


    Cygwin’s setup.exe

    It has also command line mode. Moreover it allows you to upgrade all installed packages at once.

    setup.exe-x86_64.exe -q --packages=bash,vim
    

    Example use:

    setup.exe-x86_64.exe -q --packages="bash,vim"

    You can create an alias for easier use, for example:

    alias cyg-get="/cygdrive/d/path/to/cygwin/setup-x86_64.exe -q -P"

    Then you can for example install the Vim package with:

    cyg-get vim

提交回复
热议问题