Home » Questions » Computers [ Ask a new question ]

Upgrading and installing packages through the Cygwin command-line?

Upgrading and installing packages through the Cygwin command-line?

I'm a blind computer user that uses Cygwin.

Asked by: Guest | Views: 233
Total answers/comments: 5
Guest [Entry]

"Install apt-cyg:

lynx -source raw.githubusercontent.com/transcode-open/apt-cyg/master/apt-cyg > apt-cyg
install apt-cyg /bin

After that you'll be able to install say the package ""lynx"" including dependencies by running:

apt-cyg install lynx"
Guest [Entry]

"Old question, but for others that google and got here: Official setup has command line arguments which allowed me to prepare simple *.bat script - just put following line in e.g. ""install-pkg.bat"" and put that file into your root directory (e.g. C:\cygwin):

setup-x86.exe --no-desktop --no-shortcuts --no-startmenu --quiet-mode --root ""%cd%"" --packages %*

You need to download and put http://www.cygwin.com/setup-x86.exe (32bit) or http://www.cygwin.com/setup-x86_64.exe (64bit) into the same directory.
Now all you have to do to install package is:

install-pkg packagename

Positive: official setup, should always work, for any package.
Negative: current (june/2015) official setup requires administrator rights even though it actually does not need one (e.g. root directory outside system folders)."
Guest [Entry]

"setup-x86 -nq -s http://box-soft.com -P curl,git,make

or

setup-x86 -nq -s http://box-soft.com -P curl -P git -P make

This will install cURL, git, and make, with no shortcuts in quiet mode."
Guest [Entry]

I found two 'apt like' package managers for cygwin. One is a python script called cyg-apt which you can download from http://www.lilyponddotorg/~janneke/software/cyg-apt and the other is apt-cyg which you can find at http://code.google.com/p/apt-cyg/
Guest [Entry]

"There is a chicken <=> egg problem with the accepted answer. If you didn't get wget or lynx during the initial install, you cannot use apt-cyg. Here is how I installed wget so that I could use apt-cyg. (It uses the CLI features of the cygwin setup exe.)

# check to see if you are running 64 bit cygwin
$ uname -a
CYGWIN_NT-10.0 WINDOWS-ABMESEI 2.6.0(0.304/5/3) 2016-08-31 14:32 x86_64 Cygwin

# if you are not using 64 bit, get http://www.cygwin.com/setup-x86.exe instead of...
$ curl -o cygwin-setup.exe http://www.cygwin.com/setup-x86_64.exe
$ chmod +x cygwin-setup.exe

# now you are ready to use it according to: cygwin.com/faq/faq.html#faq.setup.cli
$ cygwin-setup.exe --no-desktop --no-shortcuts --no-startmenu --quiet-mode --packages wget"