编译 vim-gnome 并支持 ruby

编译 vim-gnome 并支持 ruby

我跟着这篇博文编译支持 ruby​​ 的 gvim。但是,当我 时make,我收到此错误:

/usr/bin/ld: cannot find -lruby-static
collect2: ld returned 1 exit status
link.sh: Linking failed
make[1]: *** [vim] Error 1
make[1]: Leaving directory `/home/ramon/vim/src'
make: *** [first] Error 2

我四处寻找遇到这个问题的人,但找不到任何人。这家伙完全换了电脑。

是的,我有红宝石:

$ ruby -v
ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-linux]

我该怎么办?

答案1

编译链接到的东西something通常需要something-dev安装包。你ruby-dev安装了吗?

apt-get install ruby-dev

应该可以

答案2

根据这个,您已设置好 - 只需安装vim-gnomevim-gtk,您就会拥有支持 Ruby 的 gvim。无需自行编译。

答案3

Ubuntu 18.04 更新... 为了获得 Ruby 支持,我必须卸载vim-gtk3vim-gnome。这是可以安装的软件包列表。只有这些,+ruby显示在vim --version | grep rubyCommand-T作品。

$ dpkg -l '*vim*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name              Version             Architecture Description
+++-=================-===================-============-===================================================================
un  gvim              <none>              <none>       (no description available)
ii  vim               2:8.0.1453-1ubuntu1 amd64        Vi IMproved - enhanced vi editor
un  vim-addon-manager <none>              <none>       (no description available)
un  vim-athena        <none>              <none>       (no description available)
ii  vim-common        2:8.0.1453-1ubuntu1 all          Vi IMproved - Common files
un  vim-doc           <none>              <none>       (no description available)
un  vim-gnome         <none>              <none>       (no description available)
ii  vim-gtk           2:8.0.1453-1ubuntu1 amd64        Vi IMproved - enhanced vi editor - with GTK2 GUI
un  vim-gtk3          <none>              <none>       (no description available)
ii  vim-gui-common    2:8.0.1453-1ubuntu1 all          Vi IMproved - Common GUI files
un  vim-lua           <none>              <none>       (no description available)
ii  vim-nox           2:8.0.1453-1ubuntu1 amd64        Vi IMproved - enhanced vi editor - with scripting languages support
un  vim-perl          <none>              <none>       (no description available)
un  vim-python        <none>              <none>       (no description available)
un  vim-ruby          <none>              <none>       (no description available)
ii  vim-runtime       2:8.0.1453-1ubuntu1 all          Vi IMproved - Runtime files
un  vim-scripts       <none>              <none>       (no description available)
un  vim-tcl           <none>              <none>       (no description available)
ii  vim-tiny          2:8.0.1453-1ubuntu1 amd64        Vi IMproved - enhanced vi editor - compact version

相关内容