安装 MySQL 错误临时问题?

安装 MySQL 错误临时问题?

我将于 2024 年 5 月 7 日 23.10 运行以下命令。

sudo apt-get install mysql-server
[sudo] password for USER: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies.
 mysql-common : Conflicts: mysql-server-8.0 but 8.0.36-0ubuntu0.23.10.1 is to be installed
 mysql-server-8.0 : Depends: mysql-client-8.0 (>= 8.0.36-0ubuntu0.23.10.1) but it is not installable
                Depends: mysql-server-core-8.0 (= 8.0.36-0ubuntu0.23.10.1) but it is not installable
E: Unable to correct problems, you have held broken packages.

可以看出好像目前没有适用于我的 Ubuntu 版本的 MYSQL 版本。我请针对以下问题提出建议 -升级 MySQL 服务器问题清除 MySQL 并重新安装,但错误仍然相同。

问)有没有办法从更可靠的地方/方式安装 mysql,以便它不完全依赖于 Ubuntu 版本,或者我应该等待几天看看它是否有效?

答案1

经过进一步调查后我找到了这个答案: mysql-server-8.0 冲突,由于与“自身”冲突而无法安装 然而请注意,这将删除任何和每一个文件名称中包含 MySQL,并且由于我在本地开发机器上运行,所以我不想删除 PHP 配置文件和内容!!!

然而,我确实注意到结果列表中的这两个文件,删除它们后我就可以进行安装!

rm /etc/apt/sources.list.d/mysql.list.distUpgrade

rm /etc/apt/sources.list.d/mysql.list

相关内容