今日在安裝MariaDB的時候始終提示如下錯誤,但是我已經安裝了libaio-devel庫:
CMake Error at cmake/build_configurations/mysql_release.cmake:128 (MESSAGE):
aio is required on Linux, you need to install the required library:
Debian/Ubuntu: apt-get install libaio-dev
RedHat/Fedora/Oracle Linux: yum install libaio-devel
SuSE: zypper install libaio-devel
If you really do not want it, pass -DIGNORE_AIO_CHECK to cmake.
搜尋各種解決方案後才知道因為剛開始第一次執行cmake的時候就產生了CMakeCache.txt,這個時候我並沒有安裝libaio-devel庫,然後繼續安裝依賴庫後再執行cmake其實讀取的依然是前面生成的cache文件,導致cmake判斷libaio-devel一直未被安裝。因此只要我們rm刪除CMakeCache.txt文件後重新執行cmake命令既可以解決此問題