Cygwin 错误:“-bash:fork:重试:资源暂时不可用”
我最近在计算机上重新安装了 Cygwin,以便访问我缺少的几个命令行元素。我以前在使用 Cygwin 时从未遇到过困难,但是在重新安装之后,(几乎)输入每个命令后都会继续出现错误消息。例如:
-bash-4.1$ wc m1.txt
3 [main] bash 2216 child_info_fork::abort: data segment start: parent(0x26D000) != child(0x38D000)
-bash: fork: retry: Resource temporarily unavailable
2013930 4027950 74968256 m1.txt
通常,该命令仍然运行(如上所示),但并非总是如此。有时,“错误”消息会连续出现几次(初始数字“3”将更改为“4”或“2”,特别是当我启动第二个 Cygwin 窗口时。
另外,一旦我启动Cygwin,我在提示之前收到以下消息:
3 [main] bash 6140 child_info_fork::abort: data segment start: parent(0x26D000) != child(0x36D000)
-bash: fork: retry: Resource temporarily unavailable
-bash: fork: Resource temporarily unavailable
-bash-4.1$
目前,我正在考虑是否再次卸载/重新安装 Cygwin 还是只是接受错误消息,但我很好奇是否可能存在我不知道的问题。
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, but after this reinstallation, an error message continues to appear after (almost) each command entered. For instance:
-bash-4.1$ wc m1.txt
3 [main] bash 2216 child_info_fork::abort: data segment start: parent(0x26D000) != child(0x38D000)
-bash: fork: retry: Resource temporarily unavailable
2013930 4027950 74968256 m1.txt
Generally, the command still runs (as seen above), but not always. Occasionally, the 'error' message occurs several times in a row (the initial number "3" will then change to a "4" or "2", notably if I start a second Cygwin window.
Also, as soon as I start up Cygwin, I get the following message before the prompt:
3 [main] bash 6140 child_info_fork::abort: data segment start: parent(0x26D000) != child(0x36D000)
-bash: fork: retry: Resource temporarily unavailable
-bash: fork: Resource temporarily unavailable
-bash-4.1$
At the moment, I am debating whether to uninstall/reinstall Cygwin again or just live with the error messages, but I was curious if there might be an issue that I am unaware of.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(13)
(假设 Cygwin 安装在 C:\Cygwin):
$
/usr/bin/rebaseall -v
,按 Enter 键,然后等待该过程完成。这个过程对我有用。我希望它也对你们有用。
来源:http://cygwin.wikia.com/wiki/Rebaseall
(assuming Cygwin is installed at C:\Cygwin):
$
/usr/bin/rebaseall -v
, hit enter, and wait for the process to complete.cd /usr/bin && ./rebaseall -v
instead.This process worked for me. I hope it works for you guys too.
Source: http://cygwin.wikia.com/wiki/Rebaseall
我想将以下内容添加到上述答案中,因为这是重新安装 Cygwin 后我必须做的事情:
导航到“/usr/bin”目录(通常是 C:\cygwin\bin)并右键单击,运行为管理员文件:dash.exe
然后,在 $ 提示符下键入以下内容,并在每行后按 Enter 键:
它的作用是将 dll 标记为“可变基”,然后对它们进行变基。除了上述文件(在前面的答案中)之外,您还必须有 peflags.exe。执行此操作后,您可能需要重新启动 Windows,并且您肯定需要确保没有属于 cygwin 的进程或服务正在运行。 (使用任务管理器,终止所有相关进程,然后在服务选项卡下查找以 CYG 开头的任何服务并将其停止。)
执行此操作后,我能够让 cygwin 运行,而不会出现任何有关 dll 加载到错误的错误解决了又名分叉错误等问题。
我希望这对其他人有帮助,因为找到它很痛苦。
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:
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.
为了补充这里的其他答案,我们遇到了同样的问题,但无法从 ash 或 dash shell 运行 rebase 命令。但是,当从 Windows cmd shell 启动命令时,以下内容有效。
-v 是获得详细输出
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.
-v is to get verbose output
我通过重新启动计算机解决了这个问题。可能安装了驱动程序更新并继续使用睡眠而不是关闭。
I solved this problem by restarting my computer. Probably installed a driver update and kept using sleep instead of shutting down.
我在这里找到了另一个信息:
http://cygwin.com/ml/cygwin/2014-02/msg00531.html
您必须删除数据库
/etc/rebase.db* 并在“ash”窗口中执行以下操作:
peflags * -d 1
重新设定基准
它适用于我的两台服务器。
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.
使用 cygiconv-2.dll 分叉加载 Cygwin 时遇到了同样的问题,并且在 Cygwin 终端中未成功加载,但在关闭我的防病毒软件(特别是广告感知)后,问题得到解决,并且 Cygwin 工作正常。
Experienced the same issue when loading Cygwin with cygiconv-2.dll forking and not loading successfully in the Cygwin terminal, but after turning off my AntiVirus (it was specifically Ad-aware), the issue resolved, and Cygwin worked properly.
我在 win10 上遇到错误,我试图在安装之前重新设置为 c:。
然后我看到安装程序正在将其安装到 c:/Users/myuser
所以我正在处理从 c:/Users/myuser 到 c:.badun 的所有文件
然后重新启动并打开 badun.bat
不确定这是否明智,它现在重复了 XD...但随后它又起作用了。
I had the error on win10 and i was trying to rebase to c: before install.
then i saw that the installer was installing it instead to c:/Users/myuser
so i was coping all files from c:/Users/myuser to c:.badun
and then restart plus open badun.bat
not shure if this was wise its now duplicated XD... but then it worked again.
如果您使用 babun 的 Cygwin,在 rebaseall 之后,尝试通过在 Windows 命令提示符或 Windows 资源管理器中执行 .babun\cygwin\cygwin.bat 来启动 Cygwin。
这对我有用(在启动 babun 的默认控制台时 - mintty 会导致 fork 错误)。
In case you are using babun's Cygwin, after rebaseall, try launching Cygwin by executing .babun\cygwin\cygwin.bat in a Windows command prompt or Windows explorer.
This works for me (while launching babun's default console - mintty results in fork error).
Rebase
ing 对我的情况没有帮助。除了其他人的建议之外,我注意到减少PATH
环境变量的长度解决了我的问题(对于其他人也可以从 这个答案)。Rebase
ing didn't help in my case. In addition to what other people suggested, I noticed that reducing the length ofPATH
environment variable fixed the issue for me (and for other people as well as can be seen from this answer).这个问题本质上是间歇性的,而且是间歇性的。当网络太慢而无法连接到 AWS 上的远程计算机时,我发现了这个问题。...我有通过 Gitbash shell 运行的 Shell 脚本。它使用 ssh 连接到 AWS EC2 实例......大多数时候,它运行正确,但 100 次中有 2 次遇到此问题 bash: fork: retry: 资源暂时不可用 ...从任务管理器中杀死 MSYS2 终端有助于克服这个问题......
不利的一面是您需要从头开始运行脚本......
This issue is intermittent in nature & I found this issue when there is network is too slow to connect to remote machine on AWS.... I have Shell script that runs through Gitbash shell & it connects to AWS EC2 instance with ssh..... Most of the time, it ran correctly but 2 out 100 times it get into this issue bash: fork: retry: Resource temporarily unavailable .... Killing the MSYS2 terminal from task manager helps to overcome with this issue....
Negative side is you need to run the scripts from the beginning...
我在 Windows 10 和 mobaxterm 应用程序(使用 cygwin)上遇到了同样的问题,我尝试了此处列出的所有答案,但对我来说,解决方案是简单地删除“CryptoPro CSP”应用程序。
I had the same issue on Windows 10 and the mobaxterm app (which uses cygwin) and I tried all of answers listed here however for me, the solution was to simply delete the "CryptoPro CSP" application.
升级到 Windows 10 后我开始遇到这个问题。到目前为止,我没有看到上述任何方法有效。
我注意到的是,如果您以管理员权限启动 cygwin(右键单击并说“以管理员身份运行”),那么它可以正常工作。
或者您以管理员身份打开cmd,然后从那里启动cygwin,然后它也可以正常运行。
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.
只需重新安装 cygwin 并选择 TCL 并激活 EXPECT
Just reinstall cygwin and select TCL and activate EXPECT