我是 Ubuntu 新手,我一直试图在虚拟机上托管的 Ubuntu 22.04 LTS 上安装 mysql,但无论我如何尝试,我都会收到相同的消息。我尝试完全卸载 mysql 并使用 @aquilla 提出的方法重新安装它 <这里>。我尝试将资源添加到 /etc/apt/resources.list 。我甚至尝试将操作系统从 20.04 升级到 22.04,但到目前为止,这些都不起作用。出现了这个错误消息。我非常感谢任何帮助。谢谢!
● *mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: oom-kill) since Fri 2023-02-17 09:55:40 UTC; 55ms ago
Process: 3089 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Process: 3097 ExecStart=/usr/sbin/mysqld (code=killed, signal=KILL)
Main PID: 3097 (code=killed, signal=KILL)
Status: "Server startup in progress"
CPU: 1.028s
Feb 17 09:55:40 vagrant-ubuntu-trusty-64 systemd[1]: mysql.service: A process of this unit has been killed by the OOM killer.
Feb 17 09:55:40 vagrant-ubuntu-trusty-64 systemd[1]: mysql.service: Main process exited, code=killed, status=9/KILL
Feb 17 09:55:40 vagrant-ubuntu-trusty-64 systemd[1]: mysql.service: Failed with result 'oom-kill'.
Feb 17 09:55:40 vagrant-ubuntu-trusty-64 systemd[1]: Failed to start MySQL Community Server.
Feb 17 09:55:40 vagrant-ubuntu-trusty-64 systemd[1]: mysql.service: Consumed 1.028s CPU time.
dpkg: error processing package mysql-server-8.0 (--configure):
installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
mysql-server-8.0*