Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git for Windows - The Program can't start because libiconv2.dll is missing

Tags:

git

msysgit

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,

like image 299
user413945 Avatar asked Aug 07 '10 17:08

user413945


3 Answers

Work around from this thread: http://groups.google.com/forum/#!topic/msysgit/twrVn_EbNI4

  • cd into your git install directory
  • copy mingw\bin\libiconv-2.dll libexec\git-core
    (or copy bin\libiconv-2.dll libexec\git-core if your installation has no mingw folder)

In the linked thread Drew asks for assistance, so if you think you can help fix it you might want to reply in that Google Groups thread.

Error happens with these builds:

  • msysgit-fullinstall-1.7.4 OR 1.7.6 (and 1.7.7)
  • msysgit-netinstall-1.7.4 OR 1.7.6 (and 1.7.7)
  • Git For Windows 1.7.6 (but not 1.7.4)
like image 181
paulecoyote Avatar answered Nov 18 '22 17:11

paulecoyote


  • copy /Program Files/Git/bin/libiconv-2.dll
  • to /Program Files/Git/libexec/git-core/
like image 42
sqzaman Avatar answered Nov 18 '22 19:11

sqzaman


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!

like image 15
user413945 Avatar answered Nov 18 '22 19:11

user413945