2

I have a lot of broken packages in my ubuntu 14.04 distro, which I am trying to fix.

I am following this answer by one of our community member. I followed the first two commands and after editing the file which he has mentioned I am not sure how can I determine which are the packages are broken and which one's to be removed.

When I am running apt-get install libmysqlclient-dev I am getting that broken packages issue.

Here's the result of running above command

 The following packages have unmet dependencies:
 libmysqlclient-dev : Depends: libmysqlclient18 (= 5.5.49-0ubuntu0.14.04.1) but 10.0.25+maria-1~trusty is to be installed
E: Unable to correct problems, you have held broken packages.

Issue could be that I already have mariadb installed, although I am not sure how it got installed. I tried to remove it using the synaptic package manager but that didn't help.

Can someone please help me with that.I can share the chunk of that file If needed.

Suraj
  • 189
  • 2
  • 10
  • 2
    Include the output of your command `apt-get install libmysqlclient-dev` . – Rahul K Jha May 16 '16 at 06:37
  • check the updated question @ThorOdinson – Suraj May 16 '16 at 06:38
  • @ThorOdinson The OP updated the question. – mchid May 16 '16 at 06:44
  • @mchid You see what we face as a starter. No replies and later it gets lost without any help/suggestion. – Suraj May 16 '16 at 06:57
  • I've been trying numerous things and have tried numerous answers. If I put them as a list, someone might call "TOO MUCH INFO". BTW, yes I tried removing the mariadb from the synaptic package manager as I read the same in some thread. that didn't help either. – Suraj May 16 '16 at 07:12
  • Look, if there is too much info, people like me can always edit it out. If there's not enough info, all we can do is guess. – mchid May 16 '16 at 07:15
  • I am working on a rails app. that has mysql. I don't know when and how this mariadb got installed. I don't know about it. Updated the question – Suraj May 16 '16 at 07:16
  • Let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/39838/discussion-between-suraj-and-mchid). – Suraj May 16 '16 at 07:18
  • As for the other problem, http://stackoverflow.com/questions/22120185/couldnt-create-database-for-rails-app – mchid May 16 '16 at 07:53

1 Answers1

3

Here is what we have so far.

First, edit your /etc/apt/sources.list file and remove mariadb by executing the following commands:

sudo sed -i 's/^.*mariadb.*$//g' /etc/apt/sources.list
sudo apt-get update

Now, let's fix that broken package:

sudo apt-get install libmysqlclient18=5.5.49-0ubuntu0.14.04.1 libmysqlclient-dev

Please post any more errors, thanks.

mchid
  • 42,315
  • 7
  • 94
  • 147