0

I have recently got a new lap top at my work, I installed SourceTree. When I start the application I am getting the following System error: bash.exe The code execution cannot proceed because msys-2.0 dll was not found. Reinstalling the program may fix this problem.

enter image description here

I have reinstalled, but is still the same. There is a lot of staff on the web I tried some and again, still the same. Can somebody give an advice, please.

Vladislav
  • 121
  • 1
  • 9
  • Did you check, whether the file is **somewhere**? Maybe it's just a PATH problem.... – user1934428 Mar 20 '23 at 14:51
  • Also, for completeness, state, which bash implementation you are installing.... – user1934428 Mar 20 '23 at 14:53
  • Hello @user1934428 , thank you for the prompt answer. Yes the file is in the C:\Program Files\Git\usr\bin Regarding the bash, in Git Bash CLI I ran command: $ bash -version and got the following value: "GNU bash, version 5.2.12(1)-release (x86_64-pc-msys)". How would it be possible to point Source tree to the file, so it will see it? – Vladislav Mar 20 '23 at 20:08
  • So it seems that you have installed _git bash_. AFIK, Windows finds a DLL, if it is either in the same directory as the executable, or in the PATH. Have a look at [this](https://stackoverflow.com/questions/2463243/dll-search-on-windows) discussion, where the accepted answer shows the exact details. – user1934428 Mar 21 '23 at 06:47
  • @ user1934428 , Thank you for the answer. I copied the file (msys-2.0.dll) into the directory where SourceTree executable is located (C:\Users\Iamasauser\AppData\Local\SourceTree) but still have the same error. – Vladislav Mar 22 '23 at 13:16
  • From your screenshot, i would conclude that the error message isn't produced by `SourceTree.exe`, but by `bash.exe`. Could it be that you have on your system two versions of `bash.exe`, one of them broken, and `SourceTree` is shelling out to the broken one. So, I would first search your hard disk for `bash.exe` files. – user1934428 Mar 22 '23 at 14:02

1 Answers1

0

To solve the problem what I did is:

  1. Closed SourceTree.

  2. Asked my colleague who DO NOT have the same problem with SourceTree to identify where the file: msys-2.0.dll is located for the SourceTree

  3. Found out that it is located in location: C:\Users\MyFolderName\AppData\Local\Atlassian\SourceTree\git_local\usr\bin

  4. Copied file from the location where I found the file C:\Program Files\Git\usr\bin into the location C:\Users\MyFolderName\AppData\Local\Atlassian\SourceTree\git_local\usr\bin

  5. Opened SourseTree again - the error is gone.

Vladislav
  • 121
  • 1
  • 9