0

I am trying to install MariaDB following the official site but I keep getting errors.

First step:

$ 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.

2nd step - First error:

$ 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 <signing-key@mariadb.org>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1

3rd step - This seems fine:

$ 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 

4th step - This is fine too:

$ 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.

5th step - Last error:

$ 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.

What is causing this error? Is it the missing key in the first error above?

gpg: key F1656F24C74CD1D8: 5 signatures not checked due to missing keys
gpg: key F1656F24C74CD1D8: "MariaDB Signing Key <signing-key@mariadb.org>" not changed

Any ideas?

Run
  • 2,639
  • @user535733 I tried this sudo apt update sudo apt install mariadb-server but same error (the last error). – Run Oct 13 '18 at 12:35
  • Sigh. You are encountering expected behavior. You have not solved your previous problem yet. You did not delete the source that provides incompatible packages. Do not add any new sources until you learn how to delete old sources. – user535733 Oct 13 '18 at 12:41
  • @user535733 how do i delete the old sources then? I have tried to clean and autoremove, nothing works. – Run Oct 13 '18 at 12:43
  • The Search box at the top of each page is your friend: https://askubuntu.com/questions/43345/how-to-remove-a-repository . autoclean and autoremove work on packages, not sources. Seems like you might be unclear on how sources provide packages. Humans control sources, apt uses sources to obtain packages. Unwise source leads to incompatible packages leads to broken system - that's why using only trusted sources is wise, and that's why apt cannot solve source problems for you. – user535733 Oct 13 '18 at 12:45
  • @user535733 i use Kubuntu. i dont have that. – Run Oct 13 '18 at 12:56
  • Yes you do. Read past the first answer. Or use the Search box to find your equivalent for Kubuntu. – user535733 Oct 13 '18 at 12:57
  • @user535733 well. i am sure i have removed the old sources many times in /etc/apt/sources.list. but nothing works. – Run Oct 13 '18 at 13:02
  • Check on learning: Which source did you remove? – user535733 Oct 13 '18 at 14:13
  • @user535733 i have traced the problem in my system and fixed it. see my answer below. thanks. – Run Oct 13 '18 at 14:40

1 Answers1

0

Fixed my problem Following this answer at last!

So in my Kubuntu 18.04, I must open the Software Sources:

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

The problem came from all the items under this tab are unchecked for some reasons:

enter image description here

Ensure all of them in this tab are enabled:

enter image description here

Then I run the commands for installing Mariadb again. No more errors!

Run
  • 2,639
  • 1
    It's doubtful that you need -Restricted and -Source Code. Some folks are more comfortable disabling Multiverse, too. Very happy to see that you solved it! – user535733 Oct 13 '18 at 14:51
  • @user535733 thank you for your help! – Run Oct 13 '18 at 14:55