运行 Git GUI 时查找 tcl.init 时出错

发布于 2024-09-01 06:46:09 字数 315 浏览 6 评论 0原文

当我尝试启动 Git GUI 时收到以下错误消息:

愿望错误

在 init.tcl 中找不到可用的 以下目录:... [列表 目录如下,init.tcl 位于 第一个列出]

这可能意味着 Tcl 不是 安装正确。

我运行的是 Windows 7,我确信这个问题与此相关,但我不知道从哪里开始。我可以而且通常会使用 Bash 工具,但令我烦恼的是这不起作用。

我安装了msysgit包:Git-1.7.0.2-preview20100309.exe

I get the following error message when I try to start the Git GUI:

Error in Wish

Can't find a usable init.tcl in the
following directories: ... [list of
directories follows, init.tcl is in
the first one listed]

This probably means that Tcl wasn't
installed properly.

I'm running Windows 7 and I'm sure this problem is related to that, but I don't know where to start. I can, and most often will, use the Bash tool, but it annoys me that this doesn't work.

I installed the msysgit package: Git-1.7.0.2-preview20100309.exe

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

凉薄对峙 2024-09-08 06:46:09

问题 121 中将其报告为“问题 < code>TCL 和 NTFS 连接点,而不是 Windows 上的 Git。”
(连接点 = Windows 上本地目录的符号链接

您可以在 issue 301 进行各种测试以重新安装 msysgit(或仅限 TCL),看看问题是否仍然存在。

而不是删除一些程序来尝试确保Tcl/Tk的特定版本
您可以只修改 git.cmd 批处理脚本并为其提供特定的
可执行路径。
例如,如果您下载 tclkit 可执行文件(独立的
单文件 Tcl/Tk 可执行文件)您可以修改 git.cmd 中的最后一行(在
Program Files\Git\cmd 文件夹),使其看起来像:

:gui
@if "%2"=="citool" @goto default
@start c:\opt\bin\tclkit.exe "%git_install_root%\libexec\git-core\git-gui" -- %2 %3
%4 %5 %6 %7 %8 %9

Tclkit 绝对不会在自身外部查找任何 tcl/tk 相关文件。
它是一个 Tcl 和 Tk 运行时,具有绑定到可执行文件的虚拟文件系统,它将
只在这个虚拟文件系统中查找运行时所需的文件。
我使用这种方法通过 git-guigitk 测试 tcl 8.6 版本。这还可以更轻松地检查 Tcl/Tk 的不同版本,以查看您的问题是否与特定版本相关。
同样,您可以安装 ActiveTcl 并提供 ActiveTcl Wish.exe 文件的路径。
您可以尝试的另一件事是编辑 libexec/git-core/git-gui.tcl 脚本并
在顶部附近添加以下行(可能在“邪恶概念”注释之后:

console show

这将导致显示 Tk 控制台,您可以在其中输入命令
git-gui 正在运行。然后,您可以使用内省命令(infowinfowmbind)来查看系统。
如果我要尝试防止最小化,我想我必须连接可见性事件。我们可以使用“bind .”检查绑定了哪些事件,它返回主窗口的所有绑定事件的列表。
我的版本没有任何可疑之处(


可疑的海事组织)。

It was reported in issue 121 as an "issue with TCL and NTFS junction points, and not Git on Windows."
(junction point = symlink for local directories on Windows)

You will find in issue 301 various test to make in order to reinstall msysgit (or TCL only), to see if the problem persists.

Rather than delete a number of programs to try ensure a specific version of Tcl/Tk
you can instead just modify the git.cmd batch script and feed it a specific
executable path.
For instance, if you download a tclkit executable (a standalone
single-file Tcl/Tk executable) you can modify the last line in git.cmd (in the
Program Files\Git\cmd folder) so that it looks like:

:gui
@if "%2"=="citool" @goto default
@start c:\opt\bin\tclkit.exe "%git_install_root%\libexec\git-core\git-gui" -- %2 %3
%4 %5 %6 %7 %8 %9

Tclkit will absolutely not look outside itself for any tcl/tk related files.
It is a Tcl and Tk runtime with a virtual filesystem bound onto the executable and it will
only look inside this virtual filesystem for files needed by the runtime.
I use this approach to test tcl 8.6 versions with git-gui and gitk. This also makes it easier to check different versions of Tcl/Tk to see if your issue is related to a particular release.
Likewise you can install ActiveTcl and provide the path to the ActiveTcl wish.exe file.
The other thing you could try is to edit the libexec/git-core/git-gui.tcl script and
add the following line near the top (maybe after the 'evil concept' comment:

console show

This will cause the Tk console to be shown and you can enter commands into this while
git-gui is running. You can then use the introspection commands (info, winfo, wm and bind) to look at the state of the system.
If I was to try and prevent minimization I think I'd have to hook up the Visibility event. We can check what events are bound using 'bind .' which returns a list of all the bound events for the main window.
Nothing suspicious on my version (<Configure>,<Map> and <Visibility> would be
suspicious IMO).

秋风の叶未落 2024-09-08 06:46:09

我有同样的问题(win7 prof.32bit),当我尝试以管理员身份运行 gitk 时,我发现一切都按预期运行。

编辑:它还有助于将 git/bin/wish.exe 的权限更改为“始终以管理员身份运行”,尽管每次运行 gitk 时它都会要求提供管理员凭据。

I have the same problem (win7 prof. 32bit) and just found out that everything runs as it should, as soon as I try running gitk as administrator.

Edit: it also helps to change permissions for git/bin/wish.exe to "always run as administrator", though it'll then ask for administrator credentials any time I run gitk.

触ぅ动初心 2024-09-08 06:46:09

我上次在 ubuntu 11.04 中安装 ns2.35 时遇到了同样的问题。
安装ns2.35后,收到成功安装ns的消息。然后我在/.bashrc中设置路径。然后我给出了 ns 命令,它给了我与你得到的相同的错误。

问题是因为 ns 可执行文件也在 /usr 中,这是冲突的。

解决方案:
1. 通过在终端中输入以下命令转到位置 root-usr-local-bin
cd /usr/local/bin
2. 在那里您会找到 ns 文件。我们只需要通过给出以下命令来删除它
均方根
3. 就这样,你就完成了。现在你的 ns 开始成功运行。

希望这能帮助您解决问题。
快乐学习......

I faced the same problem during my last installation of ns2.35 in ubuntu 11.04.
After I install ns2.35, got message of successful installation of ns. Then I set path in /.bashrc. Then I gave ns command which gave me same error which you got.

The problem is because, ns executable is also at /usr which is conflicting.

Solution:
1. Go to location root-usr-local-bin by giving following command in terminal
cd /usr/local/bin
2. There you would find the ns file. We just need to remove it by giving following command
rm ns
3. Thats it, you are done. Now your ns starts running successfully.

Hope this would help you solve the problem.
Happy Learning.....

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文