今天安装MySQL,在make的时候报错,错误信息如下:
In file included from mysys_priv.h:16,
from my_new.cc:21:
../include/my_global.h:1516:15: error: new: No such file or directory
make[1]: *** [my_new.o] Error 1
make[1]: Leaving directory `/opt/mysql-5.1.45-10/mysys'
make: *** [all-recursive] Error 1
检查了操作系统版本等情况,都没问题,configure时也没报错,可以正常产生Makefile
将有问题服(假设是A机)的config.log和另外一台正常服(假设是B机)的config.log做对比
发现A机,有2处比较严重的报错
conftest.c:181:21: error: termcap.h: No such file or directory
conftest.cpp:314:20: error: cxxabi.h: No such file or directory
在B机上
updatedb
for i in `locate termcap.h`; do rpm -qf $i; done |uniq
输出:
libtermcap-devel-2.0.8-46.1
ncurses-devel-5.5-24.20060715
dev86-0.16.17-2.2
for i in `locate cxxabi.h`; do rpm -qf $i; done |uniq
输出:
libstdc++-devel-4.1.2-48.el5
libstdc++44-devel-4.4.0-6.el5
xulrunner-devel-1.9.0.18-1.el5_4
到A机上用rpm -qa查询libtermcap-devel,ncurses-devel,dev86,libstdc++-devel,libstdc++44,xulrunner-devel的安装情况
发现libtermcap-devel,dev86,libstdc++-devel没有安装
yum -y install libtermcap-devel dev86 libstdc++-devel
然后再make,就没有报错了
MySQL安装报错:my_global.h151615 error new No such file or directory