環境:win7 64位
Error: Could not fork child process: Resource temporarily unavailable (-1).
DLL rebasing may be required; see ‘rebaseall / rebase –help’.
問題現象 : 在安裝Git64位後,運行git bash一直報錯,failed to fork child process no such file or directory,dll rebasing may be required
解決辦法:
1、進入Git安裝目錄,運行git-cmd.exe;
2、執行命令:cd usr/bin,進入/bin目錄;
3、執行命令:cp msys-2.0.dll ../ ,將msys-2.0.dll拷貝到上一級目錄;
4、執行命令:rebase -b 0x76000000 ../msys-2.0.dll
5、執行命令:rebase -b 0x30000000 ../msys-2.0.dll
6、執行命令:cp ../msys-2.0.dll . ,將msys-2.0.dll拷回/bin當前目錄(. 代表當前目錄)
重新運行git-bash.exe,問題解決!
如果問題依然存在,可以嘗試修改註冊表:
1、打開運行,輸入regedit打開註冊表
2、找到目錄中[HKEY_CLASSES_ROOT\Directory\Background\shell \ git_shell \ command]的值爲C:\Program Files\Git\git-bash.exe
3、將其替換成C:\Program Files\Git\bin\sh.exe