apt for cygwin

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

About these ads
Posted in cygwin, windows
28 comments on “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

    • yanger says:

      Did anyone get this to work? export TMP=/tmp fixes the TMP issue, but all of a sudden it stopped working. Assuming because cygwin updated as well..

  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. 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.

  15. SilversleevesX says:

    Next step: getting the Cygwin project chiefs to write a GUI frontend for this. Imagine folks, an Adept or Synaptic for Cygwin, instead of that clunky, counter-intuitive setup.exe.

    For initial installs of Cygwin? Maybe something more along the lines of Wubi (http://wubi-installer.org/), which enables one to put a complete Linux on the same partition as their Windows install — scripted according to what the user wants/plans to do with their Ubuntu and how much space they’re willing to give up to do it.

    BZT

  16. [...] No cygwin (nominho difícil de lembrar) você deve escolher quais pacotes você quer instalar diretamente no executável de instalação (setup) do programa, o qual eu inicialmente utilizei como um simples “Next, Next, Finish”. Executei-o novamente, procurei pelos pacotes requeridos pelo google e aproveitei para pegar o que parece ser a versão dele do apt-get (detalhes aqui também). [...]

  17. yanger says:

    there must be a little problem with my cygwin setup or something (windows 7 + cygwin 1.7) as if i try to save it in /bin, i get access denied problems… when running it from the cwd /home/myfolder, i get a -bash: ./cyg-apt: /usr/bin/python: bad interpreter: Permission denied

    *sigh* works fine in Windows XP + cygwin 1.7 though :)

  18. Jr H. says:

    If U are having error as:

    /cyg-apt: /usr/bin/python: bad interpreter: Permission denied

    Install ( Via setup.exe ) the package ‘python’ just ,

    Any Windows, included the XP , No problems :)

    See ya .

  19. inquam says:

    @yanger: Run cygwin as Administrator and you should not have all the permission issues

  20. anonymous says:

    thank you so much :D

  21. Will G says:

    Jr. H – thanks for that.Didn’t even think to check python

  22. Lucas Moraes says:

    Very Good, cygwin++
    Thanks

  23. CuteLinuX says:

    REQUIREMENTS
    ————
    * A base Cygwin installation.
    * Cygwin gnupg package, under Utilities
    * Cygwin Python, under Python. Currently this package is at Python 2.5.
    Python 3.0 is not currently supported.

    INSTALL
    ——-
    wget http://code.google.com/p/cyg-apt/

    $ ./install-cyg-apt.sh

    HELP
    —-
    $ cyg-apt –help

    Works fine for me ;)

    —————————————————————————-
    OS Windos 7 32bit Cygwin-Core = CYGWIN_NT-6.1
    —————————————————————————-
    Enjoy it ;)

    CuteLinuX

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: