Mysql出現(xiàn)問題:error?while?loading?shared?libraries:?libaio解決方案
問題
初始化數(shù)據(jù)庫時
mysqld --initialize --user mysql
報錯:
mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory
執(zhí)行這行命令報錯了,原因是:新的服務(wù)器環(huán)境,上面很多依賴都沒有,所以安裝軟件的時候遇到一大堆小問題,解決它很簡單,它缺少啥就安裝啥。
解決方案
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版本已停止更新相應(yīng)依賴導(dǎo)致的,下載新的yum源即可搞定。
解決方案:備份之前的repo文件,命令:
mv /etc/yum.repos.d /etc/yum.repos.d.bak
創(chuàng)建源文件目錄,命令:
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
提示成功后,初始化數(shù)據(jù)庫:
mysqld --initialize --user mysql
到此這篇關(guān)于Mysql出現(xiàn)問題:error while loading shared libraries: libaio解決方案的文章就介紹到這了,更多相關(guān)error while loading shared libraries: libaio解決方案內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
mysql 獲取規(guī)定時間段內(nèi)的統(tǒng)計數(shù)據(jù)
這篇文章主要介紹了mysql 獲取規(guī)定時間段內(nèi)的統(tǒng)計數(shù)據(jù)的相關(guān)資料,需要的朋友可以參考下2017-05-05M1芯片安裝mysql8.0數(shù)據(jù)庫的實現(xiàn)步驟(圖文)
這篇文章主要介紹了M1芯片安裝mysql8.0數(shù)據(jù)庫的實現(xiàn)實現(xiàn)步驟,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2021-02-02Linux系統(tǒng)徹底刪除Mysql的詳細(xì)教程
我們在重新安裝MySQL、或更新MySQL版本時,一定會遇到mysql數(shù)據(jù)殘留(臟數(shù)據(jù)),或組件沖突等問題,下面這篇文章主要給大家介紹了關(guān)于Linux系統(tǒng)徹底刪除Mysql的詳細(xì)教程,需要的朋友可以參考下2023-02-02mysql 5.7.17 winx64免安裝版配置方法圖文教程
這篇文章主要為大家詳細(xì)介紹了mysql 5.7.17 winx64免安裝版配置方法圖文教程,具有一定的參考價值,感興趣的小伙伴們可以參考一下2017-01-01