我刚刚安装了 Bitnami Ruby Stack(Ubuntu、Rails、Rub 等)。我想安装 postgreSQL。
我尝试了以下命令:
sudo apt-get install postgresql
但是,我明白了:
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
更新1
我尝试过这个:
sudo apt-get install postgresql-9.1
并得到这个:
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.
更新2
这是我第一次通过 iMac 的终端登录。我想我是在用户目录中。我需要在哪个目录中才能进行安装?
谢谢您的帮助!!
答案1
如果你正在运行 Ubuntu 的服务器版本,你可以尝试运行
sudo apt-get update
更新可用的软件包,然后重试安装
sudo apt-get install postgresql
但是,如果您正在运行 Ubuntu 桌面版,我建议通过 Ubuntu 软件中心安装 postgresql,因为这对我来说一直效果最好。
答案2
由于您已经在运行 Bitnami,您可以安装PostgreSQL 插件