我的实验环境是在centos6.0:

安装ncurses-5.6步骤如下:

./configure –with-shared –without-debug –without-ada –enable-overwrite
make
都没有问题
make install就出问题了

enu.so; ln -s libmenu.so.5 libmenu.so; )
linking /usr/lib/libmenu.so.5.6
gcc -O2 -shared -Wl,-soname,`basename /usr/lib/libmenu.so.5.6 .5.6`.5,-stats,-lc -o /usr/lib/libmenu.so.5.6 ../obj_s/m_attribs.o ../obj_s/m_cursor.o ../obj_s/m_driver.o ../obj_s/m_format.o ../obj_s/m_global.o ../obj_s/m_hook.o ../obj_s/m_item_cur.o ../obj_s/m_item_nam.o ../obj_s/m_item_new.o ../obj_s/m_item_opt.o ../obj_s/m_item_top.o ../obj_s/m_item_use.o ../obj_s/m_item_val.o ../obj_s/m_item_vis.o ../obj_s/m_items.o ../obj_s/m_new.o ../obj_s/m_opts.o ../obj_s/m_pad.o ../obj_s/m_pattern.o ../obj_s/m_post.o ../obj_s/m_req_name.o ../obj_s/m_scale.o ../obj_s/m_spacing.o ../obj_s/m_sub.o ../obj_s/m_userptr.o ../obj_s/m_win.o -L../lib -lncurses
/usr/bin/ld: total time in link: 0.072989
/usr/bin/ld: data size 10183296
cd /usr/lib && (rm -f libmenu.so.5; ln -s libmenu.so.5.6 libmenu.so.5; rm -f libmenu.so; ln -s libmenu.so.5 libmenu.so; )
test -z “” && /sbin/ldconfig
installing ../lib/libmenu.a as /usr/lib/libmenu.a
/usr/bin/install -c -m 644 ../lib/libmenu.a /usr/lib/libmenu.a
ranlib /usr/lib/libmenu.a
installing ./eti.h in /usr/include
installing ./menu.h in /usr/include
make[1]: Leaving directory `/lamp/ncurses-5.6/menu’
cd form && make DESTDIR=”” install
make[1]: Entering directory `/lamp/ncurses-5.6/form’
linking ../lib/libform.so.5.6
gcc -O2 -shared -Wl,-soname,`basename ../lib/libform.so.5.6 .5.6`.5,-stats,-lc -o ../lib/libform.so.5.6 ../obj_s/fld_arg.o ../obj_s/fld_attr.o ../obj_s/fld_current.o ../obj_s/fld_def.o ../obj_s/fld_dup.o ../obj_s/fld_ftchoice.o ../obj_s/fld_ftlink.o ../obj_s/fld_info.o ../obj_s/fld_just.o ../obj_s/fld_link.o ../obj_s/fld_max.o ../obj_s/fld_move.o ../obj_s/fld_newftyp.o ../obj_s/fld_opts.o ../obj_s/fld_pad.o ../obj_s/fld_page.o ../obj_s/fld_stat.o ../obj_s/fld_type.o ../obj_s/fld_user.o ../obj_s/frm_cursor.o ../obj_s/frm_data.o ../obj_s/frm_def.o ../obj_s/frm_driver.o ../obj_s/frm_hook.o ../obj_s/frm_opts.o ../obj_s/frm_page.o ../obj_s/frm_post.o ../obj_s/frm_req_name.o ../obj_s/frm_scale.o ../obj_s/frm_sub.o ../obj_s/frm_user.o ../obj_s/frm_win.o ../obj_s/fty_alnum.o ../obj_s/fty_alpha.o ../obj_s/fty_enum.o ../obj_s/fty_int.o ../obj_s/fty_ipv4.o ../obj_s/fty_num.o ../obj_s/fty_regex.o -L../lib -lncurses
/usr/bin/ld: total time in link: 0.074988
/usr/bin/ld: data size 6410880
cd ../lib && (rm -f libform.so.5; ln -s libform.so.5.6 libform.so.5; rm -f libform.so; ln -s libform.so.5 libform.so; )
linking /usr/lib/libform.so.5.6
gcc -O2 -shared -Wl,-soname,`basename /usr/lib/libform.so.5.6 .5.6`.5,-stats,-lc -o /usr/lib/libform.so.5.6 ../obj_s/fld_arg.o ../obj_s/fld_attr.o ../obj_s/fld_current.o ../obj_s/fld_def.o ../obj_s/fld_dup.o ../obj_s/fld_ftchoice.o ../obj_s/fld_ftlink.o ../obj_s/fld_info.o ../obj_s/fld_just.o ../obj_s/fld_link.o ../obj_s/fld_max.o ../obj_s/fld_move.o ../obj_s/fld_newftyp.o ../obj_s/fld_opts.o ../obj_s/fld_pad.o ../obj_s/fld_page.o ../obj_s/fld_stat.o ../obj_s/fld_type.o ../obj_s/fld_user.o ../obj_s/frm_cursor.o ../obj_s/frm_data.o ../obj_s/frm_def.o ../obj_s/frm_driver.o ../obj_s/frm_hook.o ../obj_s/frm_opts.o ../obj_s/frm_page.o ../obj_s/frm_post.o ../obj_s/frm_req_name.o ../obj_s/frm_scale.o ../obj_s/frm_sub.o ../obj_s/frm_user.o ../obj_s/frm_win.o ../obj_s/fty_alnum.o ../obj_s/fty_alpha.o ../obj_s/fty_enum.o ../obj_s/fty_int.o ../obj_s/fty_ipv4.o ../obj_s/fty_num.o ../obj_s/fty_regex.o -L../lib -lncurses
/usr/bin/ld: total time in link: 0.077988
/usr/bin/ld: data size 26579584
cd /usr/lib && (rm -f libform.so.5; ln -s libform.so.5.6 libform.so.5; rm -f libform.so; ln -s libform.so.5 libform.so; )
test -z “” && /sbin/ldconfig
installing ../lib/libform.a as /usr/lib/libform.a
/usr/bin/install -c -m 644 ../lib/libform.a /usr/lib/libform.a
ranlib /usr/lib/libform.a
installing ./form.h in /usr/include
make[1]: Leaving directory `/lamp/ncurses-5.6/form’
cd test && make DESTDIR=”” install
make[1]: Entering directory `/lamp/ncurses-5.6/test’
make[1]: Nothing to be done for `install’.
make[1]: Leaving directory `/lamp/ncurses-5.6/test’
cd misc && make DESTDIR=”” install
make[1]: Entering directory `/lamp/ncurses-5.6/misc’
make[1]: Warning: File `/usr/share/tabset’ has modification time 2.3e+04 s in the future
DESTDIR=
        prefix=/usr
        exec_prefix=/usr
        bindir=/usr/bin
        top_srcdir=..
        srcdir=.
        datadir=/usr/share
        ticdir=/usr/share/terminfo
        source=terminfo.tmp
        THIS_CC=”gcc”
        THAT_CC=”gcc”
        /bin/sh ./run_tic.sh
** Building terminfo database, please wait…
Running tic to install /usr/share/terminfo …
        You may see messages regarding extended capabilities, e.g., AX.
        These are extended terminal capabilities which are compiled
        using
                tic -x
        If you have ncurses 4.2 applications, you should read the INSTALL
        document, and install the terminfo without the -x option.
tic: symbol lookup error: tic: undefined symbol: _nc_check_termtype2
? tic could not build /usr/share/terminfo
make[1]: *** [install.data] Error 1
make[1]: Leaving directory `/lamp/ncurses-5.6/misc’
make: *** [install] Error 2

根据提示信息,我们得知是没有安装terminfo,但是通过yum和rpm我们都无法安装terminfo

所以解决办法如下:

拷贝同系列centos操作系统下 /usr/share/terminfo 这个文件夹中所有文件覆盖该系统中所有文件即可!也可以使用linux修复模式来进行,但是我没有尝试过!不过根据原理应该是可以用的!

安装ncurses安装出错的解决办法

发表评论

电子邮件地址不会被公开。 必填项已用*标注

This site uses Akismet to reduce spam. Learn how your comment data is processed.