apt for cygwin

By donc

cyg-apt is like apt and makes installing cygwin packages a lot more friendly. I’ve always disliked the clunky setup program that comes with cygwin so this is a really nice improvement.

assuming you have cygwin, wget and python installed

cd /bin
wget http://www.lilypond.org/~janneke/software/cyg-apt
chmod a+rx cyg-apt
cyg-apt setup
cyg-apt update

for more detailed instructions see cygwin-setup

16 Responses to “apt for cygwin”

  1. pete Says:

    Hello , the mirror this is linked to is not working when using cyg-apt setup :=)

  2. pete Says:

    What i mean is :D

    official_mirror = ‘http://gnu.kookel.org/ftp/cygwin’

    is not working, just getting a timeout.. so this is NOT usefull :/

  3. donc Says:

    Change the mirror that cyg-apt is using with “–mirror” argument


    cyg-apt --mirror=http://mirror.mcs.anl.gov/cygwin update

  4. pete Says:

    donc : Thanks alot..

  5. matt Says:

    the cygwin-setup page referenced have stripped out all references to cyg-apt, with no word as to why. The google cache, http://tinyurl.com/v5u4q, is still (at the time of this writing) at one of the mirrors but gone from the main jessies.org cygwin setup page.

    excerpt:
    ————
    Now install cyg-apt(1), a useful imitation of apt-get(1) which sadly isn’t itself packaged:

    wget http://www.lilypond.org/~janneke/software/cyg-apt
    chmod a+rx cyg-apt
    mv cyg-apt /bin
    cyg-apt setup
    cyg-apt update
    ———-

    there’s another link for cyg-apt at http://www.xs4all.nl/~jantien/software/cyg-apt but does not appear as up to date as the lilypond one.

  6. whazp Says:

    $ cyg-apt –mirror=http://mirror.mcs.anl.gov/cygwin update
    Traceback (most recent call last):
    File “/usr/bin/cyg-apt”, line 127, in ?
    k, v = i.split (’=', 2)
    ValueError: too many values to unpack

  7. donc Says:

    the mirror argument needs 2 dashes “–mirror”
    the problem is that “-m” is a shortcut for –mirror

    your mirror got set to “irror=http://mirror.mcs.anl.gov/cygwin”

    now cyg-apt can’t parse the config file since mirror contains “=”

    edit ~/.cyg-apt and change
    mirror=”irror=http://mirror.mcs.anl.gov/cygwin”
    to
    mirror=”http://mirror.mcs.anl.gov/cygwin”

  8. Rusty_Trombone Says:

    The explination above seems to work as of 6/2007 if anyone interested

  9. Yorga Says:

    Hi!

    I’ve followed your instructions, but I got this “cyg-apt setup” error:

    error: /cygwin no root dir

    I suppose this is because I installed Cygwin in other path than “c:\cygwin”.
    If so, is there any workaround I can use to put it to work?

    Thanks in advance,
    Yorga.

  10. Etienne Says:

    Hi Yorga,

    Try this:

    cyg-apt setup
    cyg-apt update

    It worked for me.

    Etienne

  11. xuru Says:

    Yorga,

    I got the same error as you. “error: /cygwin no root dir”

    I just went ahead and created the directory and all works well:
    mkdir /cygwin makes the directory “C:\cygwin\cygwin” to put all the cached information

    you can also change the line 25:
    root = ‘/cygwin’
    to where ever you would like the cached packages to be placed.

  12. Mariane Says:

    Thank you all for your posts. When I saw the “no root dir” error message I went ahead, like Xuru did, and I created a directory called “root”. It didn’t help at all.

    Mariane

  13. bob Says:

    to fix the no root dir do

    mkdir /cygwin

  14. Roger’s Brain Dump » apt-get or yum for cygwin Says:

    [...] http://donc.wordpress.com/2006/08/04/apt-for-cygwin/ [...]

  15. roger Says:

    There’s also http://stephenjungels.com/jungels.net/projects/apt-cyg/ which looks a little more recent

  16. jamesqiu Says:

    apt-cyg is great.
    I can’t run cyg-apt in my cygwin, but apt-cyg is fine, and stable. thanks to Stephen Jungels.

Leave a Reply