ubuntu:~$ sudo apt-get install mariadb-server
Reading package lists... Done
Building dependency tree
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:
mariadb-server : Depends: mariadb-server-10.0 (= 10.0.3+maria-1~precise) but it
is not going to be installed
E: Unable to correct problems, you have held broken packages.
我想做一个"sudo apt升级“,如下所示(见下文)。我想把MariaDB更新到最新的10.0.3版本,并在https://askubuntu.com/a/18694上读到,这样就更容易使用"sudo智能“了。虽然我按错了键,但它已经完成了升级并破坏了MariaDB。
我在Ubuntu12.04LTS x64上,MariaDB 10.0在错误发生前的三个月里工作得很好
我再次尝试安装MariaDB 10,如下面所解释的:https://downloads.mariadb.org/mariadb/repositories/
我还尝试了“清除mysql* mariadb*”并删除了它,但保留了配置文件(正如安装屏幕所要求的那样)。
我的apt sources.list包含在底部:
# MariaDB 10.0 repository list - created 2013-07-29 19:06 UTC
# http://mariadb.org/mariadb/repositories/
deb http://ftp.osuosl.org/pub/mariadb/repo/10.0/ubuntu precise main
deb-src http://ftp.osuosl.org/pub/mariadb/repo/10.0/ubuntu precise main
不过,有人在MariaDB 5.5:安装MariaDB -未满足依赖关系,mariadb 5.5方面也有类似的问题
在错误发生之前进行日志记录(尽管如上文所述,该错误是否具有智能):
The following packages have been kept back:
libmariadbclient18 libmysqlclient18 linux-headers-virtual
linux-image-virtual linux-virtual mariadb-client-10.0
mariadb-client-core-10.0 mariadb-server mariadb-server-10.0
mariadb-server-core-10.0
The following packages will be upgraded:
apt apt-transport-https apt-utils bind9-host binutils curl dnsutils
hiphop-php libapt-inst1.4 libapt-pkg4.12 libbind9-80 libcurl3
libcurl3-gnutls libdns81 libdrm-intel1 libdrm-nouveau1a libdrm-radeon1
libdrm2 libisc83 libisccc80 libisccfg82 libldap-2.4-2 liblwres80
libpython2.7 libssl-dev libssl-doc libssl1.0.0 libxml2 libxml2-dev
linux-firmware linux-libc-dev openssl python python-minimal python2.7
python2.7-minimal
36 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
Need to get 54.8 MB of archives.
发布于 2013-07-30 17:18:37
我以下列方式解决了这一问题:
在“/etc/apt/Advences.d/”中创建名为“mariadb”的新文件:
Package: *
Pin: origin ftp.osuosl.org
Pin-Priority: 1000
详细信息:https://kb.askmonty.org/en/installing-mariadb-deb-files/#pinning-the-mariadb-repository
这会使MariaDB存储库具有高于999优先级的非常高的优先级,这意味着它甚至会降低软件包安装MariaDB的级别。
原因:
甲骨文正在为MySQL发布安全更新,并且Ubuntu正在分发比MariaDB更高版本号的最新MySQL包。MariaDB (它是MySQL的分支)提供了几个与MySQL同名的二进制文件。因此,固定MariaDB存储库解决了问题。
感谢官方IRC频道的Jbboin,他为我指明了正确的方向!
发布于 2020-04-20 15:17:05
检查一下您的/etc/apt/sources.list
,可能会有一些以前安装的剩菜会导致依赖错误。把它去掉就行了。
然后
apt update
apt install mariadb-server mariadb-client
发布于 2021-02-09 20:13:42
在ubuntu 20中安装mariadb服务器时,我也遇到了同样的问题。而且起作用了。
https://stackoverflow.com/questions/17932972
复制相似问题