6

我有一点理解问题。

Qt Wiki中写道,我必须:

提示:确保将 Perl 添加到 git 前面的路径中,因为它附带过时的版本(Perl 5.8),这将导致脚本失败。

但这究竟意味着什么?这是否意味着PATH变量?它包含以下项目:

C:\Python33\
C:\Perl64\site\bin
C:\Perl64\bin
C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common
C:\Program Files (x86)\AMD APP\bin\x86_64
C:\Program Files (x86)\AMD APP\bin\x86
%SystemRoot%\system32
%SystemRoot%
%SystemRoot%\System32\Wbem
%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\
C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static
C:\Program Files\Microsoft SQL Server\110\Tools\Binn\
C:\Program Files\Common Files\Autodesk Shared\
C:\Program Files\Microsoft\Web Platform Installer\
C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\
C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\
C:\Program Files (x86)\Autodesk\Backburner\
C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\
C:\Program Files\Microsoft SQL Server\100\Tools\Binn\
C:\Program Files\Microsoft SQL Server\100\DTS\Binn\
C:\Python33\Lib\site-packages\PyQt4

有人能告诉我如何在git前面设置路径吗?我不知道那是什么意思

问候

4

4 回答 4

6

如果命令处理器在当前目录中没有找到程序,它将检查PATH环境变量中的每个目录并执行它找到的第一个。wiki 的意思是,因为 git 安装包含过时的 Perl 版本,如果 git 目录首先出现在PATH列表中,那么它将被选择而不是任何其他已安装的 Perl 版本。

git没有出现在你的PATH所以问题不会出现。在任何情况下, for 的条目Perl都在列表的开头附近,因此将首先选择已安装的 Perl。

于 2013-01-17T18:19:53.847 回答
5

我遇到了同样的问题,我安装了 perl 5.16.3。但是perl -v显示的是5.8.8,我查看了perl的文件夹,发现有两个.exe文件,分别命名为perl.exe和perl5.16.3.exe。然后我输入“perl5.16.3 init-repository”,它运行正常!

于 2014-07-01T13:48:27.840 回答
2

我的解决方案:

1.下载并安装最新版本的ActiveState perl(现在5.16.3)
2.复制内容(替换现有文件)
C:\Perl
至
C:\Program 文件 (x86)\Git
(是的,很多废话,但没关系)
3.卸载ActiveState perl

结果:您在 git 中有更新版本的 perl。

于 2014-08-04T23:27:18.203 回答
1

Here's the simplest solution:

Assuming that you installed some up-to-date version of Perl and it is already in PATH, simply go to where GIT executables are is, which is normally

C:\Program Files (x86)\Git\bin

and rename perl.exe to perl1.exe. If you really are so unhappy about this, rename it back after you're done with whatever is getting the problem.

Why does this solve the problem? Because your program will not find perl in GIT's directory, and will try to find it somewhere else, and since your have the latest version of Perl in PATH, it will find it and everything will workout.

PS: It worked with me :-)

于 2015-04-07T13:42:48.580 回答