git.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory

╄→гoц情女王★ 提交于 2019-12-22 03:58:08

问题


I am working on project using git as a VCS. Development env is on winddows and project contains some long paths so I am forced to use cygwin with git.

I have installed cygwin with git, created ssh key, uploaded key to server and that all works fine from console.

But when I try to fetch, push, pull from IntelliJ I am receiving following error:

D:/cygwin/usr/libexec/git-core/git.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory
fatal: unpack-objects failed

I have installed gettext and Devel\gettext , libsasl2 and ca-certificates packages for cygwin according to some recomendation I have found but this didn't solve the problem.

Here is my IntelliJ git configuration

What I have to do to be able use git from cygwin within IntelliJ?


回答1:


I had the exact same problem. Also tried the gettext & sasl hints; didn't work.

The solution was very simple in the end: add your cygwin bin directory to the PATH.

(This surfaced when setting bash as Terminal in IntelliJ - it wouldn't even start grep.)




回答2:


Add both C:\cygwin\bin AND c:\cygwin to the PATH.

Then restart IntelliJ Idea.




回答3:


For windows users, you can do this by adding the cygwin path to Environmental Variables, as show in the screenshot below:

UPDATE

Just make sure, when you add cygwin to your path, you add it on 'Edit environment variables for your account' as shown below and under 'User variables' rather than under 'Edite system environment variables' - this won't work otherwise.



来源:https://stackoverflow.com/questions/35087523/git-exe-error-while-loading-shared-libraries-cannot-open-shared-object-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!