我在DigitalOcean(https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-22-04)上遵循LAMP教程,但我似乎无法在Ubuntu 22.04上安装MySQL。我尝试删除我的droplet,创建一个新的,并在其他任何事情之前安装MySQL,但我在运行“sudo apt install mysql-server”后仍然得到以下结果:
mysqld will log errors to /var/log/mysql/error.log 2022-07-11T19:20:59.707275Z 0 [ERROR] [MY-011065] [Server] Unable to determine if daemon is running: Invalid argument (rc=0). 2022-07-11T19:20:59.708151Z 0 [ERROR] [MY-010946] [Server] Failed to start mysqld daemon. Check mysqld error log. Warning: Unable to start the server. Created symlink /etc/systemd/system/multi-user.target.wants/mysql.service → /lib/systemd/system/mysql.service. Job for mysql.service failed. See “systemctl status mysql.service” and “journalctl -xeu mysql.service” 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: activating (auto-restart) (Result: oom-kill) since Mon 2022-07-11 19:21:04 UTC; 36ms ago Process: 2778 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS) Process: 2786 ExecStart=/usr/sbin/mysqld (code=killed, signal=KILL) Main PID: 2786 (code=killed, signal=KILL) Status: “Server startup in progress” CPU: 1.229s dpkg: error processing package mysql-server-8.0 (–configure): installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1 Setting up libcgi-pm-perl (4.54-1) … Setting up libhtml-template-perl (2.97-1.1) … dpkg: dependency problems prevent configuration of mysql-server: mysql-server depends on mysql-server-8.0; however: Package mysql-server-8.0 is not configured yet.
dpkg: error processing package mysql-server (–configure): dependency problems - leaving unconfigured Setting up libcgi-fast-perl (1:2.15-1) … No apport report written because the error message indicates its a followup error from a previous failure. Processing triggers for man-db (2.10.2-1) … Processing triggers for libc-bin (2.35-0ubuntu3) … Errors were encountered while processing: mysql-server-8.0 mysql-server needrestart is being skipped since dpkg has failed E: Sub-process /usr/bin/dpkg returned an error code (1)
提前感谢您的建议
2条答案
按热度按时间wn9m85ua1#
由于内存不足,它失败了,我从512MB升级到1GB,现在它可以工作了
ttp71kqs2#
我升级到1GB RAM,但我认为添加交换也会有帮助