Xop*_*ter 2 python vim cygwin build ncurses
我正在尝试从Cygwin下的源包构建Vim,以启用Python支持.我按照这里给出的说明操作,但是当我运行configure
脚本时,我遇到了这个错误:
checking --with-tlib argument... empty: automatic terminal library selection
checking for tgetent in -lncurses... no
checking for tgetent in -ltermlib... no
checking for tgetent in -ltermcap... no
checking for tgetent in -lcurses... no
no terminal library found
checking for tgetent()... configure: error: NOT FOUND!
You need to install a terminal library; for example ncurses.
Or specify the name of the library with --with-tlib.
Run Code Online (Sandbox Code Playgroud)
Vim源包被下载为/usr/src/vim-7.3.tar.gz
,我提取然后尝试使用以下内容构建:
./configure --prefix=/usr/local --enable-multibyte --without-x --enable-gui=no --enable-pythoninterp
Run Code Online (Sandbox Code Playgroud)
该SO帖子中prefix
提出了该选项,其中OP具有完全相同的问题.但是,我安装了Cygwin软件包(以及它们)以及它们的库等价物,因此我不确定我的问题是什么(即,为什么脚本找不到它们).我试着明确设置的参数(如,,和),但它与像同一个地方失败:ncurses
ncursesw
configure
--with-tlib
--with-tlib=/bin/cygncurses-10.dll
ncurses
libncurses10
libncurses
checking for linking with libncurses10 library... configure: error: FAILED
Run Code Online (Sandbox Code Playgroud)
ncurses
我安装的软件包是:
欢迎所有建议!!
Kei*_*son 11
我想你错过了一个必需的包裹.冗长的解释如下; 跳到最后寻找答案.
我在./configure ...
自己的系统上运行完全相同的命令(Windows 7,Cygwin).其部分产出是:
checking for tgetent in -lncurses... yes
Run Code Online (Sandbox Code Playgroud)
这表明我没有遇到同样的问题.
该configure
脚本将更详细的日志写入src/auto/config.log
.在我的系统上,显示:
configure:9777: checking for tgetent in -lncurses
configure:9802: gcc -o conftest.exe -g -O2 -L/usr/local/lib conftest.c -lncurses -lelf >&5
configure:9802: $? = 0
configure:9812: result: yes
Run Code Online (Sandbox Code Playgroud)
该-lncurses
选项告诉链接器查看/usr/lib/libncurses.
foo,其中.foo可以是.a
,或者.so
,或者.dll
,取决于系统以及是否进行动态链接.在Cygwin上,该cygcheck
命令可以告诉您哪个包拥有指定的文件.在我的系统上:
$ ls /usr/lib/libncurses.*
/usr/lib/libncurses.a /usr/lib/libncurses.dll.a /usr/lib/libncurses.la
$ cygcheck -f /usr/lib/libncurses.*
libncurses-devel-5.7-18
libncurses-devel-5.7-18
libncurses-devel-5.7-18
Run Code Online (Sandbox Code Playgroud)
我相信安装libncurses-devel
(通过Cygwin setup.exe
)应该可以解决您的问题.