我从源代码
安装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变量。
答案 0 :(得分:1)
我有类似的错误。 我使用不同的文件夹来抛出CMAKE构建文件。我曾经在那里经营“制造”。
“mysql-5.6.15”源文件夹 “MySQL Build”文件夹,我在其中抛出make文件并打算构建二进制文件。
我在该文件夹名称中有一个空格。删除空间就可以了。 虽然我看到你的路径中没有空格,但仍然确保你没有使用带有“空格”的文件夹。当您尝试在Windows上从源代码构建MySQL时,在构建文件夹中占用空间也会出错。