i've previously installed mariadb successfully on my raspberry pi (raspian stretch lite). however i wanted to completely reinstall mariadb and also delete the old databases. i did this with the following commands:

sudo apt-get remove mysql-server mysql-client mysql-common
sudo apt-get purge mysql-server mysql-client mysql-common
sudo apt autoremove
sudo apt-get remove --purge mysql\*
sudo apt-get remove --purge mariadb\*

after having done so i tried to reinstall mariadb

sudo apt update && sudo apt upgrade
sudo apt install maradb-server

this caused an error message that the package was unable to be located. althogh i installed it previously from the same raspian depository. but i tried to install the package from the official maria db mirror:

sudo nano /etc/apt/sources.list.d/mariadb.list

i copied the mariadb repository:

# http://downloads.mariadb.org/mariadb/repositories/
deb [arch=amd64,i386,ppc64el] http://ftp.utexas.edu/mariadb/repo/10.2/debian st$
deb-src http://ftp.utexas.edu/mariadb/repo/10.2/debian stretch main

i tried again to install with the following commands:

sudo apt-get install -y mariadb-server mariadb-client

then i got the following error message

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-client : Depends: mariadb-client-10.2 (>= 10.2.24+maria~stretch) but it is not installable
 mariadb-server : Depends: mariadb-server-10.2 (>= 10.2.24+maria~stretch) but it is not installable
E: Unable to correct problems, you have held broken packages.

what went wrong? i'm rather new using linux/raspian/debian, so please be gentle. i would be really glad if i get help in resolving this problem.

  • You are trying to install intel software - who knows why – Milliways May 12 '19 at 10:44
  • @Milliways I would make it an answer. It seems the OP doesn't know the difference between ARM and Intel. – Ingo May 12 '19 at 12:01
  • that's true! dougie's comment helped me understanding the difference.. – user103591 May 13 '19 at 20:26

Remove that mariadb junk with sudo rm /etc/apt/sources.list.d/mariadb.list.

Run sudo apt update then sudo apt install libmariadbclient18 mariadb-client-10.1 mariadb-client-core-10.1 mariadb-common mariadb-server mariadb-server-10.1 mariadb-server-core-10.1

If you need 10.2 you'll have to wait for Raspbian Stretch.

  • thanks that helped! with regard to communication it would be more helpful to point out, why the mariadb repo is not useful. as i've said, i'm new to debian and i'm assuming that an official repo is most trustful, – user103591 May 13 '19 at 8:39
  • The MariaDB repo is built for the wrong processor architecture. Your laptop has an Intel processor. Your RPi has an ARM processor. Generally, you can't run Intel code on ARM or ARM code on Intel without an emulator. – Dougie May 13 '19 at 20:13
  • thx! that helps understanding! – user103591 May 13 '19 at 20:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.