SQLAdvisor icon indicating copy to clipboard operation
SQLAdvisor copied to clipboard

Ubuntu 18.04.5 LTS 安装步骤

Open michael-liumh opened this issue 3 years ago • 3 comments

完整的安装步骤:

安装依赖

apt-get install -y gcc g++ cmake make libaio1 libaio-dev libffi-dev libglib2.0-0 libglib2.0-dev

安装 libperconaserverclient18.1-dev

apt-get install -y gnupg2 && \
wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb && \
dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb && \
rm -f percona-release_latest.$(lsb_release -sc)_all.deb && \
apt-get update && \
apt-get install -y libperconaserverclient18.1-dev

编译

cmake -DBUILD_CONFIG=mysql_release -DCMAKE_BUILD_TYPE=debug -DCMAKE_INSTALL_PREFIX=/usr/local/sqlparser ./  && \
make && make install  && \
cd sqladvisor/  && \
cmake -DCMAKE_BUILD_TYPE=debug ./

添加 glibconfig.h 软连接

ln -sf /usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h /usr/local/sqlparser/include/glibconfig.h

继续安装

make && \
mv /opt/SQLAdvisor/sqladvisor/sqladvisor /bin && \
rm -rf /opt/SQLAdvisor/

michael-liumh avatar Jun 23 '21 09:06 michael-liumh

请问答主安装成功了嘛 我遇到cannot find -lperconaserverclient_r 这个错误 不知道怎么解决

ryzencool avatar Aug 07 '22 06:08 ryzencool

成功了的

michael-liumh avatar Aug 11 '22 09:08 michael-liumh