最近在 centos7 系統(tǒng)中進(jìn)行源碼安裝 mysql 的操作,但是在編譯過(guò)程中一直遇到“CMake Error”的報(bào)錯(cuò)提示,讓我非常頭疼。
CMake Error at cmake/write_configure.cmake:19 (FILE): file WRITE_CONTENT cannot open file "/root/mysql/build/CMakeCache.txt.tmp": Permission denied. Call Stack (most recent call first): cmake/define_version_file.cmake:45 (WRITE_BASIC_CONFIG) CMakeLists.txt:467 (MYSQL_CONFIGURE_FILE) -- Configuring incomplete, errors occurred! See also "/root/mysql/build/CMakeFiles/CMakeOutput.log". See also "/root/mysql/build/CMakeFiles/CMakeError.log".
經(jīng)過(guò)一番排查,我發(fā)現(xiàn)問(wèn)題在于權(quán)限的設(shè)置上。我于是修改了MySQL目錄下的所有文件及文件夾的權(quán)限為777,發(fā)現(xiàn)問(wèn)題得到了解決,成功進(jìn)行了編譯和安裝。
chmod 777 /root/mysql -R
總結(jié)來(lái)說(shuō),如果你在進(jìn)行 centos7 系統(tǒng)中的源碼安裝 mysql 操作時(shí),遇到了報(bào)錯(cuò)信息,可以先檢查一下文件權(quán)限,是否有足夠的讀寫權(quán)限,并進(jìn)行相應(yīng)地修改。