slimplynth
Posts: 21
Joined: Tue Dec 27, 2011 12:50 am

RPI3 B >>> Mariadb >>> E: Unable to correct problems, you have held broken packages.

Sun Jun 17, 2018 3:51 pm

Hi, please could someone help me, the weekend is almost gone - I've been busy building a webserver for home automation (on an off for a while now) - just gotten round/ready to add some form of database to log weather, microcontroller (picaxe) data and other things but I've been thwarted trying to install MySQL and Mariadb.

Both give the same error re. held packages.. i've not seen this before.. am i flogging a dead donkey here.. should I just get back to soldering until it's fixed? (I've seen quite a few posts about this but none of the solutions have fixed it.. and to be fair I think it's because it's my oldest rasbian with quite a few packages installed.. i've run updates through apt-get.. update/upgrade/distro...

To install Mariadb:

(i downloaded and extracted successfully to /opt)
then..

Code: Select all

apt-get update && apt-get install mariadb-server
error:

Code: Select all

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.7+maria~stretch) but it is not installable
E: Unable to correct problems, you have held broken packages.

OS Details
============================================

PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"

User avatar
The Traveler
Posts: 363
Joined: Sat Oct 21, 2017 3:48 pm

Re: RPI3 B >>> Mariadb >>> E: Unable to correct problems, you have held broken packages.

Sun Jun 17, 2018 4:08 pm

I mean no offense, and I don't know the specifics of your project, but unless your data needs are complex, why not use sqlite? https://www.sqlite.org/index.html Much simpler to install, implement, use and troubleshoot. it's highly reliable and as it's designed to be integrated into embedded systems, it's a natural match for an RPi.

There is an sqlite3 package available (recommended) for the RPi from the repository.

Cheers.
Last edited by The Traveler on Sun Jun 17, 2018 4:13 pm, edited 2 times in total.
Retired IT professional, C programmer and "beardie weirdie".
RPi interests: Developing an Infinite Improbability Drive
“Thinking outside of the box allows you to get rewards outside of your reach.” Matshona Dhliwayo

User avatar
DougieLawson
Posts: 37133
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: RPI3 B >>> Mariadb >>> E: Unable to correct problems, you have held broken packages.

Sun Jun 17, 2018 4:10 pm

What happens if you run
sudo apt-get update
sudo apt-get install mariadb-server-10.3
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

DirkS
Posts: 10140
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: RPI3 B >>> Mariadb >>> E: Unable to correct problems, you have held broken packages.

Sun Jun 17, 2018 4:18 pm

slimplynth wrote:
Sun Jun 17, 2018 3:51 pm
To install Mariadb:

(i downloaded and extracted successfully to /opt)
then..

Code: Select all

apt-get update && apt-get install mariadb-server
So you're on Stretch but downloaded a non-Stretch version from somewhere? (Raspbian Stretch version is 10.1)
Why?
And did you also download the newer version's dependencies?

slimplynth
Posts: 21
Joined: Tue Dec 27, 2011 12:50 am

Re: RPI3 B >>> Mariadb >>> E: Unable to correct problems, you have held broken packages.

Mon Jun 18, 2018 9:10 am

Cheers, I'll look and update when I get home but I'm liking the question Dirk.. I think I've probably made a copy an paste error from somewhere (I hope)..

slimplynth
Posts: 21
Joined: Tue Dec 27, 2011 12:50 am

Re: RPI3 B >>> Mariadb >>> E: Unable to correct problems, you have held broken packages.

Sun Jul 08, 2018 7:49 pm

Decided to start a fresh because I failed to maintain a log of actions on the setup - gone for a minimalist, pi zero w, set-up with nginx and mariadb... feels like I've given the skirting boards a good clean.. got micro-controller projects running in conjunction, been putting off the inevitable..

https://lb.raspberrypi.org/forums/viewt ... 6#p1338366

many thanks for your help.

Return to “Troubleshooting”