how to install apt-cyg for Cygwin?

前端 未结 6 690
滥情空心
滥情空心 2020-12-24 06:57

taken form here - explaining how to install apt-cyg

Install apt-cyg

You may have heard of programs like apt-get (Ubuntu), yu

相关标签:
6条回答
  • 2020-12-24 07:40

    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
    
    0 讨论(0)
  • 2020-12-24 07:42

    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.

    0 讨论(0)
  • 2020-12-24 07:44

    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.

    0 讨论(0)
  • 2020-12-24 07:51

    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.

    0 讨论(0)
  • 2020-12-24 07:57

    You can do this with just the browser.

    1. Right click on the "https://raw.githubusercontent.com/transcode-open/apt-cyg/master/apt-cyg" link
    2. Select "Save link as"
    3. Navigate to c:\cygwin\bin (or wherever your Cygwin binaries live)
    4. Remove the .txt extension so that it's just apt-cyg
    5. Click "Save"
    6. Run chmod in bash as shown
    0 讨论(0)
  • 2020-12-24 07:58

    You 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!

    0 讨论(0)
提交回复
热议问题