make[2]: *** [storage/perfschema/unittest/pfs_connect_attr-t] 错误 1 make[1]: *** [storage/perfschema/

在编译安装MySQL 5.6.35过程中遇到链接错误,涉及ha_partition及Sql_cmd_alter_table_truncate_partition相关函数。通过调整CMake参数和重新执行make安装步骤,可以解决问题。正确操作包括设置-CMAKE_INSTALL_PREFIX路径,不启用-DWITHOUT_PARTITION_STORAGE_ENGINE选项,然后执行make和make install。检查echo $?的返回值确认安装是否成功。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

[ 78%] Built target slave
Linking CXX executable pfs_connect_attr-t
…/…/…/sql/libsql.a(handler.cc.o): In function get_ha_partition(partition_info*)': /data0/soft/mysql-5.6.35/sql/handler.cc:460: undefined reference toha_partition::ha_partition(handlerton*, partition_info*)’
/data0/software/mysql-5.6.35/sql/handler.cc:462: undefined reference to ha_partition::initialize_partition(st_mem_root*)' ../../../sql/libsql.a(sql_partition_admin.cc.o): In functionSql_cmd_alter_table_truncate_partition::execute(THD*)’:
/data0/soft/mysql-5.6.35/sql/sql_partition_admin.cc:822: undefined reference to `ha_partition::truncate_partition(Alter_info*, bool*)’
collect2: ld 返回 1
make[2]: *** [storage/perfschema/unittest/pfs_connect_attr-t] 错误 1
make[1]: *** [storage/perfschema/unittest/CMakeFiles/pfs_connect_attr-t.dir/all] 错误 2
make: *** [all] 错误 2

安装mysql-5.6.35.tar.gz
出现的问题.
编译并安装过程中两次出现同样的问题.
此时,不用再删除文件夹重新编译再安装,
第一步:
cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/soft/mysql -DWITHOUT_PARTITION_STORAGE_ENGINE=0
注意:/usr/local/soft/mysql是代表你实际mysql的安装位置
第二步:make && make install
第三步:echo $?返回0代表程序安装成功,返回其他值代表为能成功安装

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值