New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WriteErrorException,cyg-get.ps1 #176

Closed
fatso83 opened this Issue Feb 25, 2016 · 11 comments

Comments

Projects
None yet
10 participants
@fatso83

fatso83 commented Feb 25, 2016

I really have no idea why I am having troubles with cyg-get. It talks about not being able to find a file, but it seems clearly to be present.

I installed choco+cygwin+cyg-get on another machine just hours before this happened. The only difference I can think of is that Cygwin used to be manually installed before trying to install it through Choco.

This is the output straight after installing choco and opening a new admin terminal:

PS C:\Windows\system32> choco install cyg-get
Installing the following packages:
cyg-get
By installing you accept licenses for the packages.

Cygwin v2.4.1
The package Cygwin wants to run 'chocolateyInstall.ps1'.
Note: If you don't run this script, the installation will fail.
Note: To confirm automatically next time, use '-y' or consider setting
 'allowGlobalConfirmation'. Run 'choco feature -h' for more details.
Do you want to run the script?
 1) yes
 2) no
 3) print
1
 Downloading Cygwin 64 bit
   from 'https://cygwin.com/setup-x86_64.exe'
 Installing Cygwin...
 Starting cygwin install, version 2.873
 User has backup/restore rights
 Current Directory: C:\ProgramData\chocolatey
 Could not open service McShield for query, start and stop. McAfee may not be installed, or we don't have access.
 root: C:\cygwin64 system
 Selected local directory: C:\ProgramData\chocolatey
 net: Direct
 site: http://mirrors.kernel.org/sourceware/cygwin/
 Changing gid back to original
 running: C:\cygwin64\bin\dash.exe "/etc/postinstall/0p_000_autorebase.dash"
 running: C:\cygwin64\bin\dash.exe "/etc/postinstall/0p_update-info-dir.dash"
 Changing gid to Administrators
 Ending cygwin install
 Cygwin has been installed.
 The install of cygwin was successful.

cyg-get v1.2.1
The package cyg-get wants to run 'chocolateyinstall.ps1'.
Note: If you don't run this script, the installation will fail.
Note: To confirm automatically next time, use '-y' or consider setting
 'allowGlobalConfirmation'. Run 'choco feature -h' for more details.
Do you want to run the script?
 1) yes
 2) no
 3) print
1
 Adding C:\ProgramData\chocolatey\bin\cyg-get.bat and pointing it to powershell command C:\ProgramData\chocolatey\lib\cy
g-get\tools\cyg-get.ps1
 The install of cyg-get was successful.

Chocolatey installed 2/2 package(s). 0 package(s) failed.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
PS C:\Windows\system32> cyg-get openssh
Attempting to install cygwin packages: openssh
C:\ProgramData\chocolatey\lib\cyg-get\tools\cyg-get.ps1 : Please ensure you have Cygwin installed.
To install please call 'choco install cygwin' (optionally add -y to autoconfirm).
ERROR: This command cannot be run due to the error: The system cannot find the file specified.
At line:1 char:1
+ & 'C:\ProgramData\chocolatey\lib\cyg-get\tools\cyg-get.ps1'  openssh
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,cyg-get.ps1

PS C:\Windows\system32>
@fatso83

This comment has been minimized.

Show comment
Hide comment
@fatso83

fatso83 Feb 25, 2016

This will be fixed by PR #125, if that gets merged.

fatso83 commented Feb 25, 2016

This will be fixed by PR #125, if that gets merged.

@tlin-fei

This comment has been minimized.

Show comment
Hide comment
@tlin-fei

tlin-fei Mar 4, 2016

Change the value of $cygwinsetup to the following $cygwinsetup = "$cygRoot\setup-x86_64.exe" in cyg-get.ps1 file

tlin-fei commented Mar 4, 2016

Change the value of $cygwinsetup to the following $cygwinsetup = "$cygRoot\setup-x86_64.exe" in cyg-get.ps1 file

@fatso83

This comment has been minimized.

Show comment
Hide comment
@fatso83

fatso83 Mar 4, 2016

@tlin-fei : Thanks for the input, but observe my comment above: there is already a pending PR that will fix this issue. I just applied the patch to fix my problem.

fatso83 commented Mar 4, 2016

@tlin-fei : Thanks for the input, but observe my comment above: there is already a pending PR that will fix this issue. I just applied the patch to fix my problem.

@tadeu

This comment has been minimized.

Show comment
Hide comment
@tadeu

tadeu Apr 14, 2016

I'm having this problem too, and the latest cygwin (v2.5.0) does not seem to have setup-x86_64.exe or cygwinsetup.exe

tadeu commented Apr 14, 2016

I'm having this problem too, and the latest cygwin (v2.5.0) does not seem to have setup-x86_64.exe or cygwinsetup.exe

@cwiggs

This comment has been minimized.

Show comment
Hide comment
@cwiggs

cwiggs Apr 21, 2016

@tadeu I found a workaround for this issue (tested with cygwin 2.5.0)

  1. Download the setup installer on the cygwin website: https://cygwin.com/setup-x86_64.exe
  2. Rename the installer to cygwinsetup.exe
  3. Move the installer to C:\tools\cygwin (or wherever you install cygwin)

cwiggs commented Apr 21, 2016

@tadeu I found a workaround for this issue (tested with cygwin 2.5.0)

  1. Download the setup installer on the cygwin website: https://cygwin.com/setup-x86_64.exe
  2. Rename the installer to cygwinsetup.exe
  3. Move the installer to C:\tools\cygwin (or wherever you install cygwin)
@rahulserver

This comment has been minimized.

Show comment
Hide comment
@rahulserver

rahulserver May 18, 2016

@cwiggs your workaround works for me too!

rahulserver commented May 18, 2016

@cwiggs your workaround works for me too!

@seankanderson

This comment has been minimized.

Show comment
Hide comment
@seankanderson

seankanderson Sep 15, 2016

cwiggs workaround solved my issue

image

seankanderson commented Sep 15, 2016

cwiggs workaround solved my issue

image

@austin-reynolds-10

This comment has been minimized.

Show comment
Hide comment
@austin-reynolds-10

austin-reynolds-10 Nov 14, 2016

@cwiggs thanks for posting. Just installed fresh today and still having the same issue your work around fixed it.

austin-reynolds-10 commented Nov 14, 2016

@cwiggs thanks for posting. Just installed fresh today and still having the same issue your work around fixed it.

@dwbimstr

This comment has been minimized.

Show comment
Hide comment
@dwbimstr

dwbimstr Jun 9, 2017

I am still having issues. tried the fix suggested by @cwiggs but did not work. Any suggestions ..?

image

dwbimstr commented Jun 9, 2017

I am still having issues. tried the fix suggested by @cwiggs but did not work. Any suggestions ..?

image

@ferm10n

This comment has been minimized.

Show comment
Hide comment
@ferm10n

ferm10n Jun 22, 2017

@dwbimstr I had the same issue.
I started by removing cyg-get and cygwin, then choco install cyg-get -y (note that I left out cygwin)
then I followed @cwiggs steps. I then was able to
cyg-get openssh

But now I don't know how to install sshd as a service after that. Can anyone offer suggestions?

Side note, I'm really surprised this issue is still present a year later. Wouldn't this be just a simple matter of checking if 32 or 64 bit and downloading the correct installer?

ferm10n commented Jun 22, 2017

@dwbimstr I had the same issue.
I started by removing cyg-get and cygwin, then choco install cyg-get -y (note that I left out cygwin)
then I followed @cwiggs steps. I then was able to
cyg-get openssh

But now I don't know how to install sshd as a service after that. Can anyone offer suggestions?

Side note, I'm really surprised this issue is still present a year later. Wouldn't this be just a simple matter of checking if 32 or 64 bit and downloading the correct installer?

@majkinetor

This comment has been minimized.

Show comment
Hide comment
@majkinetor

majkinetor Jun 22, 2017

Member

This cyg-get script is badly written.

I suggest people remove try / except block and see why it actually fails. While the cygwin package was recently changed to ensure setup is on right location, this is probably some other type of error.

Member

majkinetor commented Jun 22, 2017

This cyg-get script is badly written.

I suggest people remove try / except block and see why it actually fails. While the cygwin package was recently changed to ensure setup is on right location, this is probably some other type of error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment