tags:

views:

360

answers:

4

Hi,

When I attempt to run certain commands (like git push, for example) from a git Bash on Windows 7 (64bit) I get the error:

The program can't start because libiconv2.dll is missing from your computer

I have searched exhaustively for a solution to this.
The most I can find is an issue thread at the google code site (Issue 419) and a few other blogs here and there. As far as I can tell none of the suggestions offered in the posts will actually solve my issue.

I have tried re-installing. I have tried adding $GIT/bin to the PATH.
I can verify that the dll is in the $GIT/bin directory...but still I cannot push to remote.

I have a working install of msysgit on another Windows 7 box, and I installed the same way in both situations... so needless to say I am quite confused.

Any help on this would be most appreciated.

Thanks,

+1  A: 

Fastest way to fix this is locating the *.dll file on the other pc and copy it =)

Molske
A: 

I have msysgit on Windows7 without any issue with any DLL.

I have libiconv2.dll in the bin directory: C:\Path\To\Git\1.7.1\bin

The issue 419 was about someone who installed the "development environment to compile Git for Windows", not just Git.
See this SO answer for the difference between the two.

So which one did you install?

  • Git-1.x.x.x...? (like 'Git-1.7.0.2-preview20100309.exe'),
  • or msysGit-netinstall-1.x.x...? (like 'msysGit-netinstall-1.7.1-preview20100612.exe').
VonC
I Installed..Git-1.7.0.2-preview20100309.exeI definitely realize Issue 419 was a developer install, but it is one of the only search results I could find on this subject, so I hoped it might provide some insight.My libconv2.dll is in C:\Path\To\Git\bin, which is just the default install location.
@thankyoud: I understand (and your question seems well documented). Just thought to make that extra clear in my answer, for other to see the difference. The only other issue I have seen with Git having trouble to run is related to the ACL (like some kind of dll registration issue, or `%TEMP%` writing issue). Any clue on that front?
VonC
I dunno, the %temp% directory seems to have full access for my current account. Does git run under an account other than administrator when you bash? Also, as I mention before, this has never happened on any other Windows 7 install I've done...so that is why I am so perplexed. That is to say, I've never needed to fiddle with file permissions in the past.
@thankyoud: Strange. What about the "portable" installation? (just unzip it, and add the `cmd` directory to your path): will it exhibit the same faulty behavior?
VonC
@thankyoud: is there any conflict in the `PATH` on this particular Windows7? Do you see the same error with a 'minimal `PATH`' ? I.e. `"C:\Path\To\Got\cmd;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem"`
VonC
Hi,Thanks for all of your input on this...but I did find a solution, and posted it a few mins ago.
+2  A: 

I have resolved this...there are a couple of things to note here.

1) The problem was a typo in my configured origin in my local .git/config file...So I'm an idiot.

2) Git Bash does not fail gracefully in this situation, and then throws this very misleading error as an alert, rather than reporting that there is no configured origin of the name specified in the .git/config file.

The only way I was able to figure this out was by adding the $GitPath/cmd directory to my path and running git from the command line. There, I was able to get a verbose error message indicating that the remote repository did not yet exists. Then I pulled up the trusty vi editor and saw there was in fact a typo.

The lesson here. If you are getting a weird .dll error with msysgit, it could very likely be the result of a misconfiguration...rather than some system anomaly or install issue.

Thanks to everyone who tried to help with this!

+1. In case of error, always resort to a minimal native CMD session. It is generally instructive.
VonC
A: 

I saw this error with msysGit-fullinstall-1.7.3.1-preview20101002.exe on Win 7.

Added <msysgit_dir>\mingw\bin to PATH 

fix it. libiconv2.dll was found in that directory.

mv288