Inconsistent "Unable to extract /usr/bin/ssh-agent.exe" message and disappearing files

Andrey Repin
Sat Apr 1 12:35:00 GMT 2017

Greetings, Jan Normann Nielsen!

> Hello

> After using Cygwin for a couple of years, suddenly today a lot of files 
> in my Cygwin folder were missing, most notably cygwin.bat and 
> bin/ssh-agent.exe. I have no idea what has happened, the files were 
> there yesterday. I don't remember if I did an update after yesterday's 
> use, but I certainly don't remember any errors occurring if I did. I 
> tried reinstalling the openssh package, but it refused to do so. 
> Unfortunately I didn't write down the error message but I suspect it was 
> the same as the one occurring below.

Assuming you run setup with elevated privileges… Sounds much like an
"antivirus" acting up.

> Instead, I decided to start from scratch. After assuring that I had the 
> latest setup-x64.exe, I renamed my old cygwin64 folder and tried 
> installing a default installation + opensssh on my C: drive. At the 
> install of the openssh package, the installer stopped with the message:

> "Unable to extract /usr/bin/ssh-agent.exe The file is in use or some 
> other error occurred. Please stop all Cygwin processes and select 
> "Retry", or select "Continue" to go on anyway (the file will be updated 
> after a reboot)." I chose "Continue" and rebooted. The installer 
> reported no errors but this one. First of all, I don't understand the 
> error message, because there doesn't seem to be a /usr/bin folder to 
> install this file to, and from what I can see, the installer tries to 
> install in /bin because it leaves a file "" in that 
> folder before rebooting. There is no ssh-agent.exe file in that folder 
> which was empty at the start of the installation so I don't understand 
> why it's not just created instead of forcing me to do a reboot. I choose 
> "Continue", and the file did get renamed after a reboot, but Cygwin.bat, 
> Cygwin.ico, Cygwin-Terminal.ico were missing from my installation. They 
> didn't seem to be created indicating that the installer actually had 
> more problems it didn't tell me about.

> Strangely enough, if I choose to install Cygwin from scratch in the same 
> way except that I choose to install on my secondary (D:) drive, the 
> installer doesn't produce the error. But I really don't want Cygwin on 
> my D: drive. So I went back to installing on the C: drive again with the 
> same error. Then on D: again without producing the problem. I have gone 
> back and fourth at least 5 timers, but the last time I also got the 
> error installing on my D: drive. There is no consistency on the (except 
> for the drive) identical installation attempts.

> So I decided to keep Cygwin on my D: drive for the time being after a 
> (seemingly) succesful install. I ran Cygwin.bat which created my 
> skeleton files and gave me a bash prompt. Then I edited Cygwin.bat and 
> put "ssh-agent.exe " in front of the bash command like I had in my old 
> installation to aid in handling my SSH keys. I then ran Cygwin.bat which 
> made the window pop up for a split second, then it closed again and made 
> Cygwin.bat disappear along with bin/ssh-agent.exe. How did that change 
> in Cygwin.bat delete (at least) two files? If I now try to recreate 
> Cygwin.bat from a backup or save it from my Windows text editor, I get 
> either a repeating message from Explorer telling me that I need 
> administrator rights (which I have) to copy the file, or my editor tells 
> me "Access denied" when trying to save. So the Cygwin installation is 
> now broken and I can't repair it. I can delete it and start from scratch 
> again.

Normally(tm) I just run pageant and ssh-pageant at user login.

> I can't explain this behavior in any way except maybe a problem with the 
> file system or some strange bug in Cygwin. Both drives use NTFS and I've 
> run chkdsk on C: telling me there are no problems.

> Can anyone explain to me what's happening? I'm running on Windows 10 
> with all available updates (tested yesterday).

With best regards,
Andrey Repin
Saturday, April 1, 2017 15:26:01

Sorry for my terrible english...
-------------- next part --------------
A non-text attachment was scrubbed...
Type: application/octet-stream
Size: 817 bytes
Desc: not available
URL: <>
-------------- next part --------------

Problem reports:
Unsubscribe info:

More information about the Cygwin mailing list