因此,我跟踪这个指南来安装MySQL,但是我得到了一个错误,即预先安装的mariadb-client-core-10.3冲突,并且没有满足依赖关系,但是我无法安装它们,因为它们依赖于MySQL。所以完整的日志在这里:
$sudo dpkg -i mysql-{common,community-client,client,community-server,server}_*.deb
(Reading database ... 290842 files and directories currently installed.)
Preparing to unpack mysql-common_8.0.19-1ubuntu19.10_amd64.deb ...
Unpacking mysql-common (8.0.19-1ubuntu19.10) over (8.0.19-1ubuntu19.10) ...
dpkg: regarding mysql-community-client_8.0.19-1ubuntu19.10_amd64.deb containing mysql-community-client:
mysql-community-client conflicts with mariadb-client-core-10.3
mariadb-client-core-10.3 (version 1:10.3.22-0ubuntu0.19.10.1) is present and installed.
dpkg: error processing archive mysql-community-client_8.0.19-1ubuntu19.10_amd64.deb (--install):
conflicting packages - not installing mysql-community-client
Selecting previously unselected package mysql-client.
Preparing to unpack mysql-client_8.0.19-1ubuntu19.10_amd64.deb ...
Unpacking mysql-client (8.0.19-1ubuntu19.10) ...
Selecting previously unselected package mysql-community-server.
Preparing to unpack mysql-community-server_8.0.19-1ubuntu19.10_amd64.deb ...
Unpacking mysql-community-server (8.0.19-1ubuntu19.10) ...
Selecting previously unselected package mysql-server.
Preparing to unpack mysql-server_8.0.19-1ubuntu19.10_amd64.deb ...
Unpacking mysql-server (8.0.19-1ubuntu19.10) ...
Setting up mysql-common (8.0.19-1ubuntu19.10) ...
dpkg: dependency problems prevent configuration of mysql-client:
mysql-client depends on mysql-community-client (= 8.0.19-1ubuntu19.10); however:
Package mysql-community-client is not installed.
dpkg: error processing package mysql-client (--install):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of mysql-community-server:
mysql-community-server depends on mysql-client (= 8.0.19-1ubuntu19.10); however:
Package mysql-client is not configured yet.
mysql-community-server depends on mysql-community-server-core (= 8.0.19-1ubuntu19.10); however:
Package mysql-community-server-core is not installed.
dpkg: error processing package mysql-community-server (--install):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-community-server (= 8.0.19-1ubuntu19.10); however:
Package mysql-community-server is not configured yet.
dpkg: error processing package mysql-server (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mysql-community-client_8.0.19-1ubuntu19.10_amd64.deb
mysql-client
mysql-community-server
mysql-server
$ sudo apt-get remove --purge mariadb-client-core-10.3
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
akonadi-backend-mysql : Depends: mariadb-client-core-10.3 but it is not going to be installed or
virtual-mysql-client-core
mysql-client : Depends: mysql-community-client (= 8.0.19-1ubuntu19.10) but it is not installable
mysql-community-server : Depends: mysql-community-server-core (= 8.0.19-1ubuntu19.10) but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).当我运行sudo apt-get -f install时,它请求我允许删除,所以:
The following packages will be REMOVED:
mysql-client mysql-community-server mysql-server我该怎么办?谢谢你的时间。
发布于 2020-04-18 17:31:39
尝试使用apt安装mysql,但首先,停止mariadb进程:
sudo systemctl stop mariadb然后继续通过apt安装mysql。
sudo apt update
sudo apt install mysql-server然后运行这个程序,然后按照步骤执行
sudo mysql_secure_installation然后,您应该能够登录到mysql shell。
mysql -uroot -p编辑:
您也可以完全删除mariadb,然后运行命令sudo dpkg -i mysql-{common,community-client,client,community-server,server}_*.deb。命令删除mariadb
apt remove --purge mariadb mariadb-*警告:通过运行此命令,您的数据库可能会被删除。
https://askubuntu.com/questions/1228017
复制相似问题