Mysql出现问题:error while loading shared libraries: libaio解决方案 |
您所在的位置:网站首页 › MySQL启动报错缺少libaio › Mysql出现问题:error while loading shared libraries: libaio解决方案 |
问题
初始化数据库时 mysqld --initialize --user mysql 报错: mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory 执行这行命令报错了,原因是:新的服务器环境,上面很多依赖都没有,所以安装软件的时候遇到一大堆小问题,解决它很简单,它缺少啥就安装啥。 解决方案yum install -y libaio.so.1 又报错了: Errors during downloading metadata for repository ‘epel’: Status code: 404 for http://archives.fedoraproject.org/pub/archive/epel/8/Everything/x86_64/repodata/repomd.xml (IP: **) Error: Failed to download metadata for repo ‘epel’: Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried 原因是:第三方的镜像站中均已移除CentOS 8的源,Centos 8版本已停止更新相应依赖导致的,下载新的yum源即可搞定。 解决方案: 备份之前的repo文件,命令: mv /etc/yum.repos.d /etc/yum.repos.d.bak 创建源文件目录,命令: mkdir -p /etc/yum.repos.d 下载新的yum源 curl https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo > /etc/yum.repos.d/Centos-vault-8.5.2111.repo curl https://mirrors.aliyun.com/repo/epel-archive-8.repo > /etc/yum.repos.d/epel-archive-8.repo 如图所示操作: 再下载依赖: yum install -y libaio.so.1
再安装 yum install -y libaio 提示成功后,初始化数据库: mysqld --initialize --user mysql |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |