无法在ubuntu 16.04上安装mysql-server

weixin_38066019 2019-09-12 02:11:19
当我尝试使用命令安装mysql-server时,这是终端输出 – sudo apt-get install mysql-server 终端o / p Setting up mysql-community-server (5.7.18-1ubuntu16.04) ... update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode AppArmor parser error for /etc/apparmor.d/usr.sbin.mysqld in /etc/apparmor.d/usr.sbin.mysqld at line 7: Could not open 'abstractions/mysql' Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details. invoke-rc.d: initscript mysql, action "start" failed. ● mysql.service - MySQL Community Server Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Mon 2017-06-12 14:23:11 IST; 7ms ago Process: 26677 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid (code=exited, status=1/FAILURE) Process: 26612 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS) Main PID: 23756 (code=exited, status=1/FAILURE) Jun 12 14:23:06 prat14k systemd[1]: Starting MySQL Community Server... Jun 12 14:23:07 prat14k mysql-systemd-start[26612]: AppArmor parser error for... Jun 12 14:23:07 prat14k mysqld[26677]: Initialization of mysqld failed: 0 Jun 12 14:23:07 prat14k systemd[1]: mysql.service: Control process exited, ...=1 Jun 12 14:23:11 prat14k systemd[1]: Failed to start MySQL Community Server. Jun 12 14:23:11 prat14k systemd[1]: mysql.service: Unit entered failed state. Jun 12 14:23:11 prat14k systemd[1]: mysql.service: Failed with result 'exit...'. Hint: Some lines were ellipsized, use -l to show in full. dpkg: error processing package mysql-community-server (--configure): subprocess installed post-installation script returned error exit status 1 dpkg: dependency problems prevent configuration of mysql-server: mysql-server depends on mysql-community-server (= 5.7.18-1ubuntu16.04); however: Package mysql-community-server is not configured yet. dpkg: error processing package mysql-server (--configure): dependency problems - leaving unconfigured Processing triggers for libc-bin (2.23-0ubuntu7) ... No apport report written because the error message indicates its a followup error from a previous failure. Processing triggers for systemd (229-4ubuntu17) ... Processing triggers for ureadahead (0.100.0-19) ... Errors were encountered while processing: mysql-community-server mysql-server E: Sub-process /usr/bin/dpkg returned an error code (1) 我已经尝试了大约5次删除,清除和所有其他命令,但无法完成它. 也, systemctl mysql status 正在显示 AppArmor parser error for /etc 请帮忙
...全文
281 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
weixin_38093996 2019-09-12
  • 打赏
  • 举报
回复
尝试删除apparmor包: sudo apt purge apparmor 然后使用mysql-common软件包重新尝试安装: sudo apt install mysql-common mysql-server

476

社区成员

发帖
与我相关
我的任务
社区描述
其他技术讨论专区
其他 技术论坛(原bbs)
社区管理员
  • 其他技术讨论专区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧