taken form here - explaining how to install apt-cyg
Install apt-cyg
You may have heard of programs like apt-get (Ubuntu), yu
The github repo of apt-cyg asks to install apt-cyg
as follows:
lynx -source rawgit.com/transcode-open/apt-cyg/master/apt-cyg > apt-cyg
install apt-cyg /bin
(This requires lynx
to be already installed in your cygwin. If you have not selected lynx
package during installation of cygwin, you can rerun the setup at installation-path-to-cygwin\cygwin\setup\setup-x86_64.exe
and then select lynx
in its installation wizard.)
However, I was getting error while running above lynx
command. Seems that being behind corporate proxy is an issue. And I was unable to figure it out how to configure the proxy for lynx
.
So I simply went to github to access apt-cyg
script here. I downloaded the script from browser, by navigating to above link, right clicking and then save as. Note that you have to save it without extension (that is, select "All Files" in "Save as type" drop down of "Save As" window, instead of "Text Document"), because browser may by default save it as text file (txt
). If you have downloaded it as txt, you may change extension. Cut paste this file to path-tocygwin\cygwin\setup\bin
.
Thats it!!! Now apt-cyg
must be accessible from cygwin terminal.
Note:
Dont forget to set proxt path if you are running apt-cyg install
behind corporate proxy:
export http_proxy=http://username:password@proxy-server-name:proxy-server-port
export https_proxy=http://username:password@proxy-server-name:proxy-server-port
For example:
export http_proxy=http://mahesh:password%40123@proxy.mycompany.com:8080
export https_proxy=http://mahesh:password%40123@proxy.mycompany.com:8080
Note @
in password should be replaced with %40
.
Then you can install packages:
apt-cyg install gcc-core
It seems like there is not problem with the extension but with the line endings in the script (see the part ^M). Similar things happen when you use git on several platforms and change unix ending lf to windows ending clrf and so.
Consider change clrf to lf (removing cr) by the command:
sed -i 's/\r//g' apt-cyg
There should be no extension in commands so do not add any extension to the apt-cyg after downloading it to /bin
.
Install Net packages with setup.exe, then use wget.exe https://raw.githubusercontent.com/transcode-open/apt-cyg/master/apt-cyg
and install apt-cyg /bin
as it was mentioned above.
Remember that the setup-x86.exe
or setup-x86_64.exe
downloaded from https://www.cygwin.com/ is the official method for installing cygwin. If you install using some other method and have problems, you may get little or no official support. Just use the official gui installer to install and update packages.
You can do this with just the browser.
chmod
in bash as shownYou install it like this:
1 - Make sure lynx
is installed
2 - Run lynx -source rawgit.com/transcode-open/apt-cyg/master/apt-cyg > apt-cyg
3 - Run install apt-cyg /bin
That's it!