【问题标题】:Mysql installation error (unmet dependencies)Mysql安装错误(未满足的依赖项)
【发布时间】:2018-05-19 22:44:05
【问题描述】:

我只是想从我的 ubuntu 重新安装 mysql。所以我已经清除了 mysql,但是当我尝试安装它时。它显示依赖项未满足错误。

    sudo apt-get install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
mysql-server is already the newest version (5.7.22-0ubuntu0.17.10.1).
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 mysql-server : Depends: mysql-server-5.7 but it is not going to be installed
 mysql-testsuite-5.7 : Depends: mysql-server-5.7 (= 5.7.22-0ubuntu0.17.10.1) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

当我尝试更新它时显示:-

     sudo apt-get update
Hit:1 http://archive.ubuntu.com/ubuntu artful InRelease
Hit:2 http://de.archive.ubuntu.com/ubuntu artful InRelease
Hit:3 http://security.ubuntu.com/ubuntu artful-security InRelease
Err:4 http://ppa.launchpad.net/canonical-kernel-team/pti/ubuntu artful InRelease
  403  Forbidden
Ign:5 http://archive.ubuntu.com/ubuntu trusty InRelease
Hit:6 http://de.archive.ubuntu.com/ubuntu artful-updates InRelease
Hit:7 http://archive.ubuntu.com/ubuntu trusty Release
Hit:8 http://de.archive.ubuntu.com/ubuntu artful-backports InRelease
Hit:9 http://ppa.launchpad.net/mutlaqja/ppa/ubuntu artful InRelease
Reading package lists... Done
E: Failed to fetch http://ppa.launchpad.net/canonical-kernel-team/pti/ubuntu/dists/artful/InRelease  403  Forbidden
E: Some index files failed to download. They have been ignored, or old ones used instead.

当我尝试修复依赖时,我们得到的问题仍然是一样的:-

sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  mysql-server-5.7
Suggested packages:
  mailx tinyca
The following NEW packages will be installed:
  mysql-server-5.7
0 upgraded, 1 newly installed, 0 to remove and 105 not upgraded.
3 not fully installed or removed.
Need to get 3,189 kB of archives.
After this operation, 48.3 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://de.archive.ubuntu.com/ubuntu artful-updates/main amd64 mysql-server-5.7 amd64 5.7.22-0ubuntu0.17.10.1 [3,189 kB]
Fetched 3,189 kB in 0s (14.9 MB/s)
Preconfiguring packages ...
(Reading database ... 158292 files and directories currently installed.)
Preparing to unpack .../mysql-server-5.7_5.7.22-0ubuntu0.17.10.1_amd64.deb ...
grep: /etc/mysql/: No such file or directory
Failed to stop mysql.service: Unit mysql.service not loaded.
invoke-rc.d: initscript mysql, action "stop" failed.
invoke-rc.d returned 5
There is a MySQL server running, but we failed in our attempts to stop it.
Stop it yourself and try again!
dpkg: error processing archive /var/cache/apt/archives/mysql-server-5.7_5.7.22-0ubuntu0.17.10.1_amd64.deb (--unpack):
 subprocess new pre-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/mysql-server-5.7_5.7.22-0ubuntu0.17.10.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

没有一个修复对我有用。

在此先感谢 :) 快乐编码

【问题讨论】:

  • Stack Overflow 是一个编程和开发问题的网站。这个问题似乎离题了,因为它与编程或开发无关。请参阅帮助中心的What topics can I ask about here。也许Ask UbuntuSuper UserUnix & Linux Stack Exchange 会是一个更好的提问地点。
  • 对不起
  • 是的,这个问题最好位于 Ask Ubuntu。在那里张贴你的东西,你应该很快得到帮助。
  • 需要等待 20 分钟才能发布问题。 :3
  • 您可以标记问题并要求版主移动它,这样您就不必在一个站点上删除它并在另一个站点上创建它。它还会重置问题的分数。无论出于何种原因,Stack Exchange 网络都不允许您自己迁移它。另见Author initiated migration to other SE sites?

标签: mysql linux ubuntu


【解决方案1】:

您的系统似乎卡在了mysql的进程中。重新启动系统并运行以下代码。

sudo apt-get update
sudo apt-get -f install
sudo apt purge -y mysql-server
sudo apt install -y mysql-server

然后,mysql 安装程序会提示您提供密码,它应该可以正常工作。

【讨论】:

  • 对不起,它给了我同样的问题。无论如何感谢您的帮助
猜你喜欢
  • 1970-01-01
  • 2017-11-17
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-04-19
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多