2016-01-09 90 views
2

我想最近升級到Fedora 23努力打造VIM

我讓ncurses之後在我的用戶目錄編譯vim ncurses的devel的

[[email protected] lib]# dnf install ncurses 
Last metadata expiration check performed 1:09:48 ago on Sat Jan 9 10:33:06 2016. 
Package ncurses-5.9-21.20150214.fc23.x86_64 is already installed, skipping. 
Dependencies resolved. 
Nothing to do. 
Complete! 

[[email protected] lib]# dnf install ncurses-devel 
Last metadata expiration check performed 1:09:58 ago on Sat Jan 9 10:33:06 2016. 
Package ncurses-devel-5.9-21.20150214.fc23.x86_64 is already installed, skipping. 
Dependencies resolved. 
Nothing to do. 
Complete! 

這裏是證明時NCURSES未找到:

[[email protected] lib]# ll /usr/lib/libncurs* 
lrwxrwxrwx. 1 root root  17 Jun 17 2015 /usr/lib/libncurses.so.5 -> libncurses.so.5.9 
lrwxrwxrwx. 1 root root  19 Jun 17 2015 /usr/lib/libncurses++.so.5 -> libncurses++.so.5.9 
-rwxr-xr-x. 1 root root 154448 Jun 17 2015 /usr/lib/libncurses.so.5.9 
-rwxr-xr-x. 1 root root 68176 Jun 17 2015 /usr/lib/libncurses++.so.5.9 
lrwxrwxrwx. 1 root root  20 Jun 17 2015 /usr/lib/libncurses++w.so.5 -> libncurses++w.so.5.9 
lrwxrwxrwx. 1 root root  18 Jun 17 2015 /usr/lib/libncursesw.so.5 -> libncursesw.so.5.9 
-rwxr-xr-x. 1 root root 68176 Jun 17 2015 /usr/lib/libncurses++w.so.5.9 
-rwxr-xr-x. 1 root root 216000 Jun 17 2015 /usr/lib/libncursesw.so.5.9 
[[email protected] lib]# ll /usr/lib64/libncurs* 
-rw-r--r--. 1 root root 330362 Jun 17 2015 /usr/lib64/libncurses.a 
-rw-r--r--. 1 root root 183214 Jun 17 2015 /usr/lib64/libncurses++.a 
-rw-r--r--. 1 root root 473398 Jun 17 2015 /usr/lib64/libncurses_g.a 
-rw-r--r--. 1 root root 183214 Jun 17 2015 /usr/lib64/libncurses++_g.a 
-rw-r--r--. 1 root root  31 Jun 17 2015 /usr/lib64/libncurses.so 
lrwxrwxrwx. 1 root root  17 Jun 17 2015 /usr/lib64/libncurses++.so -> libncurses++.so.5 
lrwxrwxrwx. 1 root root  17 Jun 17 2015 /usr/lib64/libncurses.so.5 -> libncurses.so.5.9 
lrwxrwxrwx. 1 root root  19 Jun 17 2015 /usr/lib64/libncurses++.so.5 -> libncurses++.so.5.9 
-rwxr-xr-x. 1 root root 155056 Jun 17 2015 /usr/lib64/libncurses.so.5.9 
-rwxr-xr-x. 1 root root 76968 Jun 17 2015 /usr/lib64/libncurses++.so.5.9 
-rw-r--r--. 1 root root 183214 Jun 17 2015 /usr/lib64/libncurses++w.a 
-rw-r--r--. 1 root root 433400 Jun 17 2015 /usr/lib64/libncursesw.a 
-rw-r--r--. 1 root root 183214 Jun 17 2015 /usr/lib64/libncurses++w_g.a 
-rw-r--r--. 1 root root 593812 Jun 17 2015 /usr/lib64/libncursesw_g.a 
lrwxrwxrwx. 1 root root  18 Jun 17 2015 /usr/lib64/libncurses++w.so -> libncurses++w.so.5 
-rw-r--r--. 1 root root  32 Jun 17 2015 /usr/lib64/libncursesw.so 
lrwxrwxrwx. 1 root root  20 Jun 17 2015 /usr/lib64/libncurses++w.so.5 -> libncurses++w.so.5.9 
lrwxrwxrwx. 1 root root  18 Jun 17 2015 /usr/lib64/libncursesw.so.5 -> libncursesw.so.5.9 
-rwxr-xr-x. 1 root root 76968 Jun 17 2015 /usr/lib64/libncurses++w.so.5.9 
-rwxr-xr-x. 1 root root 208400 Jun 17 2015 /usr/lib64/libncursesw.so.5.9 

當我運行./configure

./configure --with-features=huge \ 
      --enable-fail-if-missing \ 
      --enable-luainterp=yes \ 
      --enable-mzschemeinterp \ 
      --enable-perlinterp \ 
      --enable-pythoninterp=yes \ 
      --with-python-config-dir=/usr/lib64/python2.7/config \ 
      --enable-python3interp=yes \ 
      --enable-tclinterp=yes \ 
      --enable-rubyinterp=yes \ 
      --enable-cscope \ 
      --enable-multibyte \ 
      --enable-gui=gtk2 \ 
      --prefix=$HOME/Build/vim 

我得到

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. 

我能做些什麼?

+0

你試過'--with-tlib'嗎? – romainl

+0

我應該放什麼? --with-tlib =/usr/lib/libncurses.so?我試過 – statquant

+0

不是說你不應該能夠在你的主目錄下建立vim,但是不要只使用Vim Fedora已有的理由? – mattdm

回答

6

我跑進Fedora23上的相同問題。這裏是我的解決方案:

  1. 請確保您有ncurses-devel安裝
  2. CFLAGS = -fPIC的./configure --with-tlib =的ncurses和your_options

我檢查config.log的發現gcc抱怨缺少'-fPIC'

+0

cureses或curses? – statquant

+0

它的工作,但現在我不能'安裝',雖然我猜這個問題已經回答 – statquant

+0

我安裝了'ncurses-devel',我的問題解決了。 – alhelal

1

你顯然沒有安裝ncurses的開發包。在Fedora23,這將是ncurses-devel,例如,ncurses-devel-5.9-21.20150214.fc23.x86_64

不這樣做,你只有運行庫(這是必需的)。

一旦你的,對VIM 7.4的配置會顯示這樣的事情:

checking --with-tlib argument... empty: automatic terminal library selection 
checking for tgetent in -ltinfo... yes 
checking whether we talk terminfo... yes 
checking what tgetent() returns for an unknown terminal... zero 
checking whether termcap.h contains ospeed... yes 
checking whether termcap.h contains UP, BC and PC... yes 
checking whether tputs() uses outfuntype... no 

延伸閱讀:

+0

你有沒有檢查過我沒有安裝ncurses-devel? – statquant

+0

我明白了 - 但是你沒有提到你正在嘗試構建的vim版本,也沒有提到src/auto/config.log對你的配置所說的話。你也沒有展示開發包的結果,但只列出了運行時的一部分。配置腳本將需要libtinfo.so for vim - 不是libncurses.so –