gpt4 book ai didi

vim - 在 Linux Mint 上使用 lua 构建 Vim

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

这就是我所做的:

# Install lua
curl -R -O http://www.lua.org/ftp/lua-5.2.2.tar.gz
tar zxf lua-5.2.2.tar.gz
cd lua-5.2.2
sudo make linux install

# build vim
sudo apt-get install libncurses5-dev libgnome2-dev libgnomeui-dev \
libgtk2.0-dev libatk1.0-dev libbonoboui2-dev \
libcairo2-dev libx11-dev libxpm-dev libxt-dev python-dev ruby-dev mercurial
sudo apt-get remove vim vim-runtime gvim
sudo apt-get remove vim-tiny vim-common vim-gui-common
cd ~
hg clone https://code.google.com/p/vim/
cd vim
./configure --with-features=huge \
--enable-rubyinterp \
--enable-pythoninterp \
--with-python-config-dir=/usr/lib/python2.7-config \
--enable-perlinterp \
--enable-gui=gtk2 --enable-cscope --prefix=/usr \
--enable-luainterp \
--with-lua-prefix=/usr/local/bin/lua
make VIMRUNTIMEDIR=/usr/share/vim/vim74
sudo make install

但是 ./configure步骤返回:
checking --enable-luainterp argument... yes
checking --with-lua-prefix argument... /usr/local/bin/lua
checking --with-luajit... no
checking for lua... (cached) /usr/local/bin/lua
checking Lua version... (cached) 5.2
checking if lua.h can be found in /usr/local/bin/lua/include... no
checking if lua.h can be found in /usr/local/bin/lua/include/lua5.2... no

我可以验证在那些位置找不到 lua.h,但我不知道在哪里可以找到它。

最佳答案

编辑

我又试了一次,遇到问题,发现了一个包vim-nox已经有 vim 支持。

原答案

我不完全确定我最终是如何做到的,但感谢@wrikken 关于标题的提示。

# Install lua from binaries (these are out-of-date but at least they worked).
sudo apt-get install lua50 liblua50-dev liblualib50-dev

# Remove old vims
sudo apt-get remove vim vim-runtime gvim
sudo apt-get remove vim-tiny vim-common vim-gui-common

# Download and build a new vim
sudo apt-get install libncurses5-dev libgnome2-dev libgnomeui-dev \
libgtk2.0-dev libatk1.0-dev libbonoboui2-dev \
libcairo2-dev libx11-dev libxpm-dev libxt-dev python-dev ruby-dev mercurial
cd ~
hg clone https://code.google.com/p/vim/
cd vim
cd ~/vim
./configure --with-features=huge \
--enable-rubyinterp \
--enable-pythoninterp \
--with-python-config-dir=/usr/lib/python2.7-config \
--enable-perlinterp \
--enable-gui=gtk2 --enable-cscope --prefix=/usr \
--enable-luainterp \
--with-lua-prefix=/usr/local

此时,查看./configure的输出,发现它找到了lua.h。如果没有,找出它在哪里(恐怕我不记得它在哪里了)。在/usr/local 中使用符号链接(symbolic link)到它,例如 sudo ln -s ../lua.h并重新运行 ./configure。

最后:
sudo make VIMRUNTIMEDIR=/usr/share/vim/vim74       
sudo make install

如果它仍然不起作用,请在某个地方的论坛上发帖,然后去户外散步。你会发现它突然开始表现。

关于vim - 在 Linux Mint 上使用 lua 构建 Vim,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19472554/

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