1

从源代码安装 mysq 时出现错误

 [  0%] Building C object cmd-line-utils/libedit/CMakeFiles/edit.dir/chared.c.o
/root/mysql/mysql-5.5.31/cmd-line-utils/libedit/chared.c: In function 'ch_init':
/root/mysql/mysql-5.5.31/cmd-line-utils/libedit/chared.c:421: error: 'ED_UNASSIGNED' undeclared (first use in this function)
/root/mysql/mysql-5.5.31/cmd-line-utils/libedit/chared.c:421: error: (Each undeclared identifier is reported only once
/root/mysql/mysql-5.5.31/cmd-line-utils/libedit/chared.c:421: error: for each function it appears in.)
/root/mysql/mysql-5.5.31/cmd-line-utils/libedit/chared.c: In function 'ch_reset':
/root/mysql/mysql-5.5.31/cmd-line-utils/libedit/chared.c:476: error: 'ED_UNASSIGNED' undeclared (first use in this function)
/root/mysql/mysql-5.5.31/cmd-line-utils/libedit/chared.c: In function 'ch_end':
/root/mysql/mysql-5.5.31/cmd-line-utils/libedit/chared.c:597: error: 'ED_UNASSIGNED' undeclared (first use in this function)
make[2]: *** [cmd-line-utils/libedit/CMakeFiles/edit.dir/chared.c.o] Error 1
make[1]: *** [cmd-line-utils/libedit/CMakeFiles/edit.dir/all] Error 2
make: *** [all] Error 2

如何解决这个错误?我检查了 mysql 源,确实没有 ED_UNASSIGNED 变量。

4

1 回答 1

1

我有类似的错误。我使用不同的文件夹来抛出 CMAKE 构建文件。从我以前运行“make”的地方。

“mysql-5.6.15”源文件夹“MySQL Build”文件夹,我确实在其中抛出了 make 文件并打算构建二进制文件。

我在该文件夹名称中有一个空格。删除空间就可以了。虽然我看到你的路径中没有空格,但仍然确保你没有使用带有“空格”的文件夹。当您尝试在 Windows 上从源代码构建 MySQL 时,构建文件夹中的空间也会产生错误。

于 2014-01-20T09:10:56.673 回答