msys2 git 在 windows 上查找共享对象文件时出错
msys2 git on windows errors looking for shared object file
我正在尝试使用 Visual Studio 代码中的 msys2 git 安装(在 msys2 中 100% 有效),但在尝试时立即出错。我得到的错误是:
...msys2/usr/lib/git-core/git-remote-https.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory
有人遇到过这种情况吗?任何修复?
感谢 David Grayson - 我能够得到这个 - 答案是双重的。
确保您的代码所在的目录 (repo) 与您的 msys 目录相同(即我的代码在 C:/Users/<username>
,但安装在 /home/<username>
) 所以我不得不做一个从 C:/Users/<username>
到 /home/<username>
的 mklink。
正如大卫所说,但 git.exe
进入您的 windows 路径。对我来说就是 <basedir>msys2/usr/bin/
之后一切正常。
顺便说一下,这是 windows 10 上的 visual studio 代码。
谢谢-
另一种选择是创建一个批处理文件并在 git 的批处理文件中指向 Code.exe;即git.bat
@echo off
@set "PATH==%PATH%;C:\cmder\vendor\msys2\usr\bin;"
@call "C:\cmder\vendor\msys2\usr\bin\git.exe" %*
我喜欢让我的系统保持便携,这就是这种布局的原因。
我正在尝试使用 Visual Studio 代码中的 msys2 git 安装(在 msys2 中 100% 有效),但在尝试时立即出错。我得到的错误是:
...msys2/usr/lib/git-core/git-remote-https.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory
有人遇到过这种情况吗?任何修复?
感谢 David Grayson - 我能够得到这个 - 答案是双重的。
确保您的代码所在的目录 (repo) 与您的 msys 目录相同(即我的代码在
C:/Users/<username>
,但安装在/home/<username>
) 所以我不得不做一个从C:/Users/<username>
到/home/<username>
的 mklink。正如大卫所说,但
git.exe
进入您的 windows 路径。对我来说就是<basedir>msys2/usr/bin/
之后一切正常。
顺便说一下,这是 windows 10 上的 visual studio 代码。
谢谢-
另一种选择是创建一个批处理文件并在 git 的批处理文件中指向 Code.exe;即git.bat
@echo off
@set "PATH==%PATH%;C:\cmder\vendor\msys2\usr\bin;"
@call "C:\cmder\vendor\msys2\usr\bin\git.exe" %*
我喜欢让我的系统保持便携,这就是这种布局的原因。