问题描述
当我尝试安装mysql-server时,出现错误消息:
When I try to install mysql-server, an error comes like:
dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mysql-server-5.7
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
是什么意思.有什么想法吗?
What does it mean. Any ideas?
推荐答案
dpkg
返回错误代码1并不表示特定的内容,但通常与依赖关系有关.在您的情况下,您尝试安装同一软件包的两个版本/实例,即mysql-server
和mysql-server-5.7
.因此,请执行以下操作以消除所有冗余的依赖关系问题并安装正常运行的mysql程序包
dpkg
returning an error code 1 doesn't mean anything specific but it usually has to do with dependency issues. In your case, you tried to install two versions/instances of the same package i.e. mysql-server
and mysql-server-5.7
. So do the following to remove any redundant dependency issues and install a functioning mysql package
sudo apt-get clean
sudo apt-get purge mysql*
sudo apt-get update
sudo apt-get install -f
sudo apt-get install mysql-server-5.7
sudo apt-get dist-upgrade
这应该可以解决当前的问题.但是以后,请小心在sudo apt-get install
之后添加的软件包名称,因为错误的软件包名称列表(例如,列表中的多余条目)会导致无法安装其中一个软件包,甚至更糟的是,您甚至可能会发现自己在#DEPENDENCY-HELL的地狱般的深处徘徊
this should fix the problem at hand. But in the future, have care about the package names you add after sudo apt-get install
since the wrong list of package names - for example redundant entries in the list - results in failure to install either of the packages or worse - you might even find yourself wading through the hellish depths of #DEPENDENCY-HELL
这篇关于dpkg:错误处理程序包mysql-server的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!