如何在 Ubuntu Minimal 12.04 中安装 MySQL?
当我尝试apt-get install mysql-server
(以 root 身份)进行全新安装后apt-get update
,apt-get upgrade
收到以下信息:
# Setting up mysql-server-5.5 (5.5.37-0ubuntu0.14.04.1) ...
# /var/lib/dpkg/info/mysql-server-5.5.postinst: line 146: logger: command not found
# ATTENTION: An error has occured. More info is in the syslog!
# /var/lib/dpkg/info/mysql-server-5.5.postinst: line 236: logger: command not found
# dpkg: error processing package mysql-server-5.5 (--configure):
# subprocess installed post-installation script returned error exit status 127
# dpkg: dependency problems prevent configuration of mysql-server:
# mysql-server depends on mysql-server-5.5; however:
# Package mysql-server-5.5 is not configured yet.
答案1
你试过这个吗
sudo apt-get update --fix-missing
sudo apt-get build-dep mysql-client5.5 mysql-server5.5
sudo apt-get -f install
尝试一下然后告诉我效果如何。
答案2
由于您是全新安装,请按照步骤进行干净卸载。
apt-get purge mysql-server :这将删除 MySQL 服务器
apt-get purge mysql-common:这将删除相关的 MySQL 文件
rm -rf /var/lib/mysql :这将删除 MySQL 的数据文件夹
rm -rf /etc/mysql
一旦完成后,它将从您的机器中完全删除 MySQL。
现在尝试使用命令通过指定属性来重新安装
apt-get 安装 mysql-server --fix-missing --fix-broken
希望有帮助