Cygwin error: “-bash: fork: retry: Resource temporarily unavailable”

前端 未结 13 2317
星月不相逢
星月不相逢 2020-11-30 18:34

I recently reinstalled Cygwin on my computer in order to get access to several command line elements that I was missing. I have never had previous difficulty with Cygwin, bu

相关标签:
13条回答
  • 2020-11-30 18:53

    I found another information here : http://cygwin.com/ml/cygwin/2014-02/msg00531.html You have to delete the database at /etc/rebase.db* and do in a "ash" windows : peflags * -d 1 rebaseall It works for me on 2 servers.

    0 讨论(0)
  • 2020-11-30 18:56

    I would like to add the following to the above answers, as it is what I had to do after reinstalling Cygwin:

    Navigate to the "/usr/bin" directory (usually, C:\cygwin\bin) and right click, Run as Administrator the file: dash.exe Then, at the $ prompt type the following, hitting enter after each line:

    cd /usr/bin/
    /usr/bin/peflags * -d 1
    /usr/bin/rebaseall -v
    

    What it does is, it marks the dll's as "rebase-able," and then rebases them. You have to have peflags.exe in addition to the above files (in previous answers). You may have to restart windows after doing this and you will definitely need to make sure that there are no processes nor services belonging to cygwin running. (Use task manager, kill any related processes, and then under the services tab look for any service starting with CYG and stop it.)

    After doing this, I was able to get cygwin to run without any errors about dll's being loaded to the wrong addresses aka fork errors, etc.

    I hope that this helps others, as it was a pain to find.

    SOURCE: http://www.cygwin.com/faq.html#faq.using.fixing-fork-failures 
    and the rebase README file.
    
    0 讨论(0)
  • 2020-11-30 18:57

    To add on to other answers here, we ran into the same issue but could not run the rebase command from the ash or dash shell. However, when launching the command from the Windows cmd shell, the following worked.

    cmd /c "C:\cygwin64\bin\ash.exe /usr/rebaseall -v"
    

    -v is to get verbose output

    0 讨论(0)
  • 2020-11-30 19:00

    (assuming Cygwin is installed at C:\Cygwin):

    1. Open Task Manager and close any processes that look to be Cygwin related.
    2. Open C:\Cygwin\bin in Windows Explorer
    3. Verify that dash.exe, ash.exe, rebase.exe, and rebaseall exist in this folder
      • If any of them are missing, re-run Cygwin setup and select the dash, ash, and rebase packages
    4. right-click your C:\Cygwin folder, uncheck Read-only (if its checked), and press OK.
      • When an error about not being able to switch some files comes up, select "Ignore All". Wait for this process to complete.
    5. Browse to C:\Cygwin\bin in Windows Explorer
    6. Right click dash.exe and click "Run as Administrator". A command Prompt should appear with nothing but a $
    7. Type /usr/bin/rebaseall -v, hit enter, and wait for the process to complete.
      • If you get errors about Cygwin processes running, try Step 1 again. If that still doesn't work, Restart your computer into safe mode and try these steps again.
      • A commenter noted that, depending on your settings, you may have to type cd /usr/bin && ./rebaseall -v instead.
    8. Try opening Cygwin again.

    This process worked for me. I hope it works for you guys too.

    Source: http://cygwin.wikia.com/wiki/Rebaseall

    0 讨论(0)
  • 2020-11-30 19:02

    I started facing this problem after upgrading to windows 10. As of now I do not see that any of the above method working.
    What I am noticing is that if you start cygwin with admin right (right click and say "run as admin") then it works fine.
    Or you open cmd as administrator and then launch cygwin from there, then also it runs fine.

    0 讨论(0)
  • 2020-11-30 19:03

    Rebaseing didn't help in my case. In addition to what other people suggested, I noticed that reducing the length of PATH environment variable fixed the issue for me (and for other people as well as can be seen from this answer).

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