gpt4 book ai didi

vim - Command-T 不会为 Vim 编译

转载 作者:行者123 更新时间:2023-12-04 21:40:57 25 4
gpt4 key购买 nike

我正在尝试为 Vim 安装 Command-T,但到目前为止没有成功。

我使用 brew 重新安装了 vim,vim 的 ruby​​ 版本是 2.5.1

我使用 RVM 安装了 ruby​​ 2.5.1,我运行了 ruby​​ ruby​​ extconf.rb,我得到了这个输出

checking for float.h... yes
checking for ruby.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for fcntl.h... yes
checking for stdint.h... yes
checking for sys/errno.h... yes
checking for sys/socket.h... yes
checking for ruby/st.h... yes
checking for st.h... yes
checking for pthread_create() in -lpthread... yes
creating Makefile

然后我运行 make 并得到它:
compiling ext.c
compiling heap.c
compiling match.c
compiling matcher.c
compiling watchman.c
linking shared-object ext.bundle

但是当我尝试在我的 vim 上使用它时,我收到以下消息:
command-t.vim could not load the C extension.
Please see INSTALLATION and TROUBLE-SHOOTING in the help.
Vim Ruby version: 2.5.1-p57
For more information type: :help command-t

如果我使用 ruby​​ 2.5.0 版本编译,提示说我得到了错误的 ruby​​ 版本。

我不知道我还能做什么,请帮助我

最佳答案

问题是你必须编译命令-t C 扩展名相同 ruby vim 编译。

您提到您正在使用 RVM 以及使用 编译的 vim ruby 2.5.1-p57 .您需要选择完全相同的 ruby .如果您使用来自 的 ruby​​ 2.5.1-p57 编译(在您的情况下安装了 brew )vim RVM 然后运行命令:

$ rvm use 2.5.1-p57

然后重新编译command-t,确保 ruby -v返回 2.5.1-p57:
$ ruby -v

$ ruby extconf.rb

$ make

如果这没有帮助,可能您将它安装在具有相同 2.5.1 版本的系统范围内的 ruby​​ 上。这可以解决问题:
$ rvm use system

$ ruby extconf.rb

$ make

编译思路 命令-t 同版本 ruby vim 编译。

在更糟糕的情况下,您可以重新安装 vim。

您也可以引用 command-t docs

关于vim - Command-T 不会为 Vim 编译,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51736673/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com