我剛剛在我的Mac上通過自制軟件安裝了MariaDB。在安裝結束時,我得到了以下錯誤:MariaDB自制軟件安裝錯誤
Warning: The post-install step did not complete successfully
You can try again using `brew postinstall mariadb`
如果我跑brew postinstall mariadb
我得到:
==> /usr/local/Cellar/mariadb/5.5.34/bin/mysql_install_db --verbose --user=andrew --basedir=/usr/loca
MariaDB is hosted on launchpad; You can find the latest source and
email lists at http://launchpad.net/maria
Please check all of the above before mailing us! And remember, if
you do mail us, you should use the /usr/local/Cellar/mariadb/5.5.34/scripts/mysqlbug script!
READ THIS: https://github.com/mxcl/homebrew/wiki/troubleshooting
這是不是有幫助!我跟隨的教程告訴我運行unset TEMPDIR
,然後mysql_install_db --user=mysql --basedir=$(brew --prefix mariadb)
;下面運行的結果:
/usr/local/opt/mariadb/bin/my_print_defaults: Can't read dir of '/usr/local/etc/my.cnf.d' (Errcode: 2)
Fatal error in defaults handling. Program aborted
chown: ./data: Operation not permitted
Cannot change ownership of the database directories to the 'mysql'
user. Check that you have the necessary permissions and try again.
我懷疑問題有事情做與/usr/local/etc/my.cnf.d
文件夾。我已經看到這在我嘗試過的一些事情中提到過,但它並不存在於我的機器上。我已經嘗試了其他教程中找到的幾個不同的mysql_install_db
命令,但它們都拋出了(不同的)錯誤消息。
感謝您的幫助!
感謝您的信息。我也不明白,但創建這個文件夾確實也解決了我的問題。 –
這完全有效,但你需要小心,因爲'brew prune'會移除'/ usr/local/etc/my.cnf.d'。修復方法是在'brew prune'後手動替換它,只是想提醒一下。 –