Linux: Ruby Rails sqlite3 libsqlite3-dev libssl-dev Install Error

By Xah Lee. Date:

Sqlite and libssl-dev Install Problem

Summary. If you are trying to install Ruby on Rails on Ubuntu, and you got this error:

The following packages have unmet dependencies:
 libsqlite3-dev : Depends: libsqlite3-0 (= 3.7.9-2ubuntu1) but 3.7.9-2ubuntu1.1 is to be installed
 libssl-dev : Depends: libssl1.0.0 (= 1.0.1-4ubuntu5.8) but 1.0.1-4ubuntu5.9 is to be installed
 sqlite3 : Depends: libsqlite3-0 (= 3.7.9-2ubuntu1) but 3.7.9-2ubuntu1.1 is to be installed
E: Unable to correct problems, you have held broken packages.

The problem is probably because you disabled one of the repository source in update-manager.

To fix, start update-manager &, then in the “settings” button at bottom, in “Updates” tab, make sure you check box the “Recommended updates (precise-updates)”.

linux update-manager screenshot 2013-06-03
linux update-manager screenshot

Manual Fix Using dpkg

If you search the web, you might find a few page that try to tell you how to fix it by using dpkg. For example, these:

That would work, but is very dangerous and error-prone. If the problem is a turned-off source repository, you better turn it back on, else you'll need to manually fix lots of other packages.

If the problem is not repository source, here's how you can fix it manually.

See also: Linux: How to Install/Remove Packages .