gpt4 book ai didi

python - 编译支持python的vim7.4源码失败

转载 作者:太空狗 更新时间:2023-10-30 00:20:46 25 4
gpt4 key购买 nike

我已经下载了vim7.4的源码,决定升级vim到7.4。但是,我无法为其添加 python 支持:

./configure  --enable-pythoninterp  --enable-rubyinterp --enable-gui=no --without-x --enable-cscope --enable-multibyte --prefix=/usr

在检查 src/auto/config.log 时,我发现:

configure:5592: checking Python's configuration directory
configure:5614: result:·
configure:5620: result: can't find it!

已安装的 python 信息:

dpkg-query -l python
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 Description
+++-================================-================================- ================================================================================
ii python 2.7.3-0ubuntu2.2 interactive high-level object-oriented language (default version)

在 src 目录中调用 make 之后:

./vim --version | grep python
+cryptv +linebreak -python +viminfo
+cscope +lispindent -python3 +vreplace

看来是vim 找不到python 的配置目录造成的。如何解决?

提前感谢您的见解。

最佳答案

确保安装了 python 开发包(我认为是 python-devel 或 python-dev)。您可以通过传递给 ./configure 来指定 python 配置目录,例如:

--with-python-config-dir=/usr/lib64/python2.7/config

要找到配置目录(您可能需要先执行 updatedb):

locate python | grep '/config$'

关于python - 编译支持python的vim7.4源码失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18370234/

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