天天看点

编译安装MYSQL,遇到configure: error: No curses/termcap library found的解决方法!

安装

mysql-5.1.48.tar.gz

cd mysql-5.1.48

./configure --prefix=/usr/local/mysql --localstatedir=/var/lib/mysql --with-comment=Source --with-server-suffix=-enterprise-gpl --with-mysqld-user=mysql --without-debug --with-big-tables --with-charset=utf8 --with-collation=utf8_general_ci --with-extra-charsets=all --with-pthread --enable-static --enable-thread-safe-client --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --enable-assembler --without-ndb-debug --with-plugins=myisam,innobase

报错如下:

checking for tgetent in -lncursesw... no

checking for tgetent in -lncurses... no

checking for tgetent in -lcurses... no

checking for tgetent in -ltermcap... no

checking for tgetent in -ltinfo... no

checking for termcap functions library... configure: error: No curses/termcap library found

问题是C编译器问题 ,解决方法:

编译安装MYSQL,遇到configure: error: No curses/termcap library found的解决方法!

解决方法如下:(这网友提供的办法有问题)

  ./configure --with-named-curses-libs=/usr/lib/libncursesw.so.5

不过他其中的几步骤是多余的 原因其实都是在ncurses-devel没有引起的,

    rpm -qa ncurses-devel

查看出 没有安装而导致了一系列的问题,yum list|grep ncurses 查看过 但是由于没仔细看 之后base 就没注意到install是正常的 而错以为安装好了 而一直用上面 ./configure --with-named-curses-libs=/usr/lib/libncursesw.so.5的方法错误的引导了进去 ,看来以后要再仔细点了 呵呵

基本上的问题都在以下文章中

本文转自 holy2009 51CTO博客,原文链接:http://blog.51cto.com/holy2010/424226

继续阅读