AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1486011
Accepted
newcat1000
newcat1000
Asked: 2023-09-16 19:28:01 +0800 CST2023-09-16 19:28:01 +0800 CST 2023-09-16 19:28:01 +0800 CST

mysql-common : 冲突: mysql-server-8.0 但要安装 8.0.34-0ubuntu0.22.04.1

  • 772
sudo apt-get purge mysql-client-8.0 mysql-server-8.0 mysql-server-core-8.0

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package 'mysql-client-8.0' is not installed, so not removed
Package 'mysql-server-8.0' is not installed, so not removed
Package 'mysql-server-core-8.0' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


sudo apt-get autoremove sudo apt-get autoclean

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Del thermald 2.4.9-1ubuntu0.3 [222 kB]

sudo apt-get install mysql-server

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.34-0ubuntu0.22.04.1 is to be installed
 mysql-server-8.0 : Depends: mysql-client-8.0 (>= 8.0.34-0ubuntu0.22.04.1) but it is not installable
                    Depends: mysql-server-core-8.0 (= 8.0.34-0ubuntu0.22.04.1) but it is not installable
E: Unable to correct problems, you have held broken packages.

我有未满足的依赖项,即使它们已被删除。我不明白。

谢谢!

编辑:

我已重新安装旧快照以保持我的网站在线。于是又安装了旧版本的mysql8.0。我得到了未满足的依赖关系。

 apt policy mysql-common

mysql-common:
  Installed: 8.0.33-1ubuntu18.04
  Candidate: 8.0.33-1ubuntu18.04
  Version table:
 *** 8.0.33-1ubuntu18.04 500
        500 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 Packages
        100 /var/lib/dpkg/status
     5.8+1.0.8 500
        500 http://mirrors.digitalocean.com/ubuntu jammy/main amd64 Packages

dpkg -l | grep mysql

ii  dbconfig-mysql                         2.0.21                                      all          dbconfig-common MySQL/MariaDB support
ii  mysql-apt-config                       0.8.24-1                                    all          Auto configuration for MySQL APT Repo.
ii  mysql-client                           8.0.33-1ubuntu18.04                         amd64        MySQL Client meta package depending on latest version
ii  mysql-common                           8.0.33-1ubuntu18.04                         amd64        Common files shared between packages
ii  mysql-community-client                 8.0.33-1ubuntu18.04                         amd64        MySQL Client
ii  mysql-community-client-core            8.0.33-1ubuntu18.04                         amd64        MySQL Client Core Binaries
ii  mysql-community-client-plugins         8.0.33-1ubuntu18.04                         amd64        MySQL Client plugin
ii  mysql-community-server                 8.0.33-1ubuntu18.04                         amd64        MySQL Server
ii  mysql-community-server-core            8.0.33-1ubuntu18.04                         amd64        MySQL Server Core Binaires
ii  mysql-server                           8.0.33-1ubuntu18.04                         amd64        MySQL Server meta package depending on latest version
rc  mysql-server-5.7                       5.7.33-0ubuntu0.18.04.1                     amd64        MySQL database server binaries and system database setup
ii  php-mariadb-mysql-kbs                  1.2.12-1                                    all          Knowledge base about MariaDB and MySQL server variables
ii  php-mysql                              2:8.1+92ubuntu1                             all          MySQL module for PHP [default]
ii  php8.1-mysql                           8.1.2-1ubuntu2.13                           amd64        MySQL module for PHP


sudo apt update

Hit:1 http://repo.mysql.com/apt/ubuntu bionic InRelease
Hit:2 http://security.ubuntu.com/ubuntu jammy-security InRelease
Hit:3 https://repos.insights.digitalocean.com/apt/do-agent main InRelease
Get:4 http://mirrors.digitalocean.com/ubuntu jammy InRelease [270 kB]
Hit:5 https://updates.signal.org/desktop/apt xenial InRelease
Hit:6 http://mirrors.digitalocean.com/ubuntu jammy-updates InRelease
Hit:7 http://mirrors.digitalocean.com/ubuntu jammy-backports InRelease
Fetched 270 kB in 1s (390 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
2 packages can be upgraded. Run 'apt list --upgradable' to see them.


apt list --upgradable

Listing... Done
mysql-client/jammy-updates,jammy-security 8.0.34-0ubuntu0.22.04.1 amd64 [upgradable from: 8.0.33-1ubuntu18.04]
mysql-server/jammy-updates,jammy-security 8.0.34-0ubuntu0.22.04.1 amd64 [upgradable from: 8.0.33-1ubuntu18.04]

apt install mysql-client mysql-server

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-client-8.0 but 8.0.34-0ubuntu0.22.04.1 is to be installed
                Conflicts: mysql-client-core-8.0 but 8.0.34-0ubuntu0.22.04.1 is to be installed
 mysql-server : Depends: mysql-server-8.0 but it is not installable
E: Unable to correct problems, you have held broken packages.

谢谢!

server
  • 1 1 个回答
  • 38 Views

1 个回答

  • Voted
  1. Best Answer
    nobody
    2023-09-17T02:59:25+08:002023-09-17T02:59:25+08:00

    第一次恢复jammy 的默认存储库。

    认同

    grep -r deb /etc/apt/sources.list /etc/apt/sources.list.d/
    

    如果此存储库 repo.mysql.com处于活动状态,请将其删除。

    sudo apt -s purge $(dpkg -l | grep mysql | awk '{print $2}')
    

    这首先是模拟。为了彻底删除。

    sudo apt purge $(dpkg -l | grep mysql | awk '{print $2}')
    

    刷新包缓存。

    sudo apt update
    

    然后再试一次。

    • 2

相关问题

  • 使用 dpkg 手动安装软件包是否会阻止未来的升级路径?

  • 如何从命令行刻录双层 dvd iso

  • 如果在服务器机器上运行 Ubuntu 桌面版,性能损失是多少?

  • 将桌面版剥离为服务器版的最简单方法是什么?

  • 如何与无头服务器进行图形交互?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve