Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just installed a Bitnami Ruby Stack (Ubuntu, Rails, Rub, ...). I would like to install postgreSQL.

I tried the following command:

sudo apt-get install postgresql

But, I get this:

    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Package postgresql is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source


I tried this:

sudo apt-get install postgresql-9.1

And got this:

    The following packages have unmet dependencies:
    postgresql-9.1 : Depends: libldap-2.4-2 (>= 2.4.7) but it is not installable
     Depends: libpq5 (>= 9.1~) but it is not going to be installed
     Depends: postgresql-client-9.1 but it is not going to be installed
     Depends: postgresql-common (>= 115~) but it is not installable
     Depends: ssl-cert but it is not installable
     E: Unable to correct problems, you have held broken packages.


This is the first time I have logged on via terminal from my iMac. I guess I'm in a user directory. What directory do I need to be in for the install to work?

Thanks for the help!!

share|improve this question
up vote 2 down vote accepted

If you are running the server version of Ubuntu, you could try running

sudo apt-get update

to update the available packages, and then retrying the install with

sudo apt-get install postgresql

If you are running the Desktop version of Ubuntu however, I would suggest installing postgresql via the Ubuntu Software Center, since this has always worked best for me.

share|improve this answer
Thanks for the help!! – Reddirt Feb 28 '13 at 22:42
Did this solve your problem? Could you please tell me (and others) how you fixed it. – Jesse Feb 28 '13 at 22:48
This did fix my issue. I'm wondering if I was in the wrong directory? When I first logged in I was in a user directory. I cd .. till I got to the top and tried the above commands. They worked! – Reddirt Feb 28 '13 at 22:51

Since you are already running Bitnami, you can install the PostgreSQL Addon

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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