command-t vim“无法加载C扩展名”


11

当我打\ t在VIM中使用Command-T扩展名时,出现错误

command-t.vim could not load the C extension

我不确定该如何解决...有什么建议吗?

谢谢


我正在使用git-repository安装方法。这是我“ rake make”时发生的情况:

~/.vim/bundle/command-t$ rake make
(in /home/petef/.vim/bundle/command-t)
/usr/bin/ruby1.8 extconf.rb
extconf.rb:24:in `require': no such file to load -- mkmf (LoadError)
    from extconf.rb:24
rake aborted!
Command failed with status (1): [/usr/bin/ruby1.8 extconf.rb...]
/home/petef/.vim/bundle/command-t/Rakefile:136
(See full trace by running task with --trace)

Answers:



5

Command-T需要编译的C扩展才能工作。这是Command-T主页上有关如何编译扩展的相关部分:

The C extension must also be then compiled; for instance, if Vimball installs
your plugin files in ~/.vim, then you would do this: 

  cd ~/.vim/ruby/command-t 
  ruby extconf.rb 
  make 

Note that Command-T requires a version of VIM with Ruby support enabled, and 
it must be compiled using the same version of Ruby that Vim itself links 
against. For more details see the documentation: 

    http://git.wincent.com/command-t.git/blob_plain/HEAD:/README.txt

我用git-repository方法安装了它。在我的command-t目录中,没有看到任何extconf.rb文件。当我按照说明进行“ rake make”操作时,我遇到了同样的问题。
皮特

皮特,你能正常工作吗?我本人只是在该字段中徘徊-您可能会丢失系统上的ruby-dev软件包。如果您仍然被卡住,请喊;我会带你穿过它。
汤姆

2

通常让人们感到最困扰的是,他们的Command-t是使用与Vim版本不同的Ruby版本编译的。为了安装Ruby并匹配正确的版本,您将要安装RVM和Ruby,安装正确的Ruby版本,然后rake make~/.vim/bundle/Command-Tplugin目录中执行。

是安装Command-t的分步指南。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.