diff --git a/plugins/mysql-community/install.sh b/plugins/mysql-community/install.sh index 2bd9202d0..fbb49985c 100755 --- a/plugins/mysql-community/install.sh +++ b/plugins/mysql-community/install.sh @@ -69,18 +69,28 @@ fi VERSION_ID=`cat /etc/*-release | grep 'VERSION_ID' | awk -F = '{print $2}' | awk -F "\"" '{print $2}'` -# 针对ubuntu24进行优化 -if [[ "$OSNAME" == "ubuntu" ]] && [[ "$VERSION_ID" =~ "24" ]]; then +# 针对ubuntu24,26进行优化 +if [[ "$OSNAME" == "ubuntu" ]] && [[ "$VERSION_ID" =~ ^(24|26)$ ]]; then cur_dir=`pwd` - cd /usr/lib/x86_64-linux-gnu - if [ ! -f libaio.so.1 ];then - ln -s libaio.so.1t64.0.2 libaio.so.1 + if [ -d /usr/lib/x86_64-linux-gnu ];then + cd /usr/lib/x86_64-linux-gnu + if [ ! -f libaio.so.1 ];then + ln -s libaio.so.1t64.0.2 libaio.so.1 + fi + + if [ ! -f libncurses.so.6 ];then + ln -s libncursesw.so.6.4 libncurses.so.6 + fi + fi - if [ ! -f libncurses.so.6 ];then - ln -s libncursesw.so.6.4 libncurses.so.6 + if [ -d /usr/lib/aarch64-linux-gnu ];then + cd /usr/lib/aarch64-linux-gnu + if [ ! -f libaio.so.1 ];then + ln -s libaio.so.1t64.0.2 libaio.so.1 + fi fi - cd $cur_dir + fi if [[ "$OSNAME" == "debian" ]] && [[ "$VERSION_ID" =~ "13" ]]; then