Meituan-Dianping / SQLAdvisor

输入SQL,输出索引优化建议
GNU General Public License v2.0
5.58k stars 1.24k forks source link

关于Linux安装最后一步失败 #68

Open ifirework opened 6 years ago

ifirework commented 6 years ago

Linking CXX executable sqladvisor /usr/bin/ld: cannot find -lperconaserverclient_r collect2: error: ld returned 1 exit status make[2]: [sqladvisor] Error 1 make[1]: [CMakeFiles/sqladvisor.dir/all] Error 2 make: *** [all] Error 2

我出现上面问题是因为我的linux上已经安装了mysql 我的操作是: 1 . rpm -qa |grep mysql 查看mysql

  1. rpm -e xxx 卸载

3, 再次安装Percona-Server-shared-56 成功

  1. 重新建立连接

  2. 成功

其实主要是 ln -s libperconaserverclient_r.so.18 libperconaserverclient_r.so 没有成功建立连接(虽然有libperconaserverclient_r.so文件)

ghost commented 6 years ago

使用 yum install http://www.percona.com/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm 后 再用yum update 更新 在安装 yum install Percona-Server-shared-56 就可以建立 ln -s libperconaserverclient_r.so.18 libperconaserverclient_r.so 亲测。

今天用docker 弄了个镜像 确定有用。。docker 镜像地址 镜像地址

bbotte commented 5 years ago

https://github.com/bbotte/SQLAdvisor/tree/master/use-directly 不用编译安装,我编译好的,可以直接用