MariaDB 安装错误:无法纠正问题,您持有损坏的软件包

MariaDB 安装错误:无法纠正问题,您持有损坏的软件包

我正在尝试按照以下方法安装 MariaDB官方网站但我一直收到错误。

第一步:

$ sudo apt-get install software-properties-common
Reading package lists... Done
Building dependency tree       
Reading state information... Done
software-properties-common is already the newest version (0.96.24.32.5).
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.

第二步-第一个错误:

$ sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
Executing: /tmp/apt-key-gpghome.aU8VMiqFGc/gpg.1.sh --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
gpg: key F1656F24C74CD1D8: 5 signatures not checked due to missing keys
gpg: key F1656F24C74CD1D8: "MariaDB Signing Key <[email protected]>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1

第三步-这看起来不错:

$ sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el] http://ftp.bme.hu/pub/mirrors/mariadb/repo/10.3/ubuntu bionic main'
Hit:1 https://mirrors.evowise.com/mariadb/repo/10.3/ubuntu bionic InRelease
Hit:2 http://ppa.launchpad.net/webupd8team/y-ppa-manager/ubuntu bionic InRelease                                                           
Hit:3 http://ftp.bme.hu/pub/mirrors/mariadb/repo/10.3/ubuntu bionic InRelease                                                              
Hit:4 http://ftp.bme.hu/pub/mirrors/mariadb/repo/10.1/ubuntu bionic InRelease                                                              
Hit:5 http://mirror.zol.co.zw/mariadb/repo/10.3/ubuntu bionic InRelease                                                                    
Hit:6 https://deb.nodesource.com/node_10.x bionic InRelease                                                                                
Hit:7 http://linux.teamviewer.com/deb stable InRelease                                                                                     
Hit:8 http://linux.teamviewer.com/deb preview InRelease                                                                                    
Ign:9 https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 InRelease                                                                 
Ign:10 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 InRelease
Hit:11 http://ftp.utexas.edu/mariadb/repo/10.3/ubuntu bionic InRelease
Hit:12 https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 Release
Hit:13 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 Release
Reading package lists... Done 

第四步-这也很好:

$ sudo apt update
Hit:1 http://ftp.bme.hu/pub/mirrors/mariadb/repo/10.3/ubuntu bionic InRelease
Hit:2 http://ftp.bme.hu/pub/mirrors/mariadb/repo/10.1/ubuntu bionic InRelease                                                              
Hit:3 http://ppa.launchpad.net/webupd8team/y-ppa-manager/ubuntu bionic InRelease                                                           
Hit:4 https://mirrors.evowise.com/mariadb/repo/10.3/ubuntu bionic InRelease                                                                
Hit:5 http://linux.teamviewer.com/deb stable InRelease                                                                                     
Ign:6 https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 InRelease                                                                 
Hit:7 https://deb.nodesource.com/node_10.x bionic InRelease                                                                                
Hit:8 http://linux.teamviewer.com/deb preview InRelease                                                                                    
Ign:9 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 InRelease                                                                 
Hit:10 https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 Release                                                
Hit:11 http://ftp.utexas.edu/mariadb/repo/10.3/ubuntu bionic InRelease                         
Hit:12 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 Release                      
Hit:13 http://mirror.zol.co.zw/mariadb/repo/10.3/ubuntu bionic InRelease 
Reading package lists... Done                      
Building dependency tree       
Reading state information... Done
All packages are up-to-date.

第五步-最后一个错误:

$ sudo apt 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.3 (>= 1:10.3.10+maria~bionic) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

导致此错误的原因是什么?是第一个错误多于?

gpg: key F1656F24C74CD1D8: 5 signatures not checked due to missing keys
gpg: key F1656F24C74CD1D8: "MariaDB Signing Key <[email protected]>" not changed

有任何想法吗?

答案1

解决了我的问题回答终于!

因此,在我的 Kubuntu 18.04 中,我必须打开软件源:

$ sudo -H software-properties-kde[sudo] 
password for lau: 
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'

问题是由于某些原因,此选项卡下的所有项目都未选中:

在此处输入图片描述

确保此选项卡中的所有功能都已启用:

在此处输入图片描述

然后我再次运行安装 Mariadb 的命令。不再有错误!

相关内容