安装postgreSQL数据库时出错

时间:2015-02-26 07:06:45

标签: mysql django postgresql

我必须在django中将我的数据库从MySQL更改为postgreSQL。但是postgreSQL没有安装。

使用命令安装postgreSQL时出错 -

sudo apt-get update && sudo apt-get upgrade
sudo apt-get purge postgresql*
sudo apt-get -f install
sudo apt-get install postgresql

在终端 -

(jango)dc@dc-comp-4:~/website$ sudo apt-get install postgresql
Reading package lists... Done
Building dependency tree       
Reading state information... Done
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:
 postgresql : Depends: postgresql-9.3 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

但它不起作用。我可以做到这一点。我必须做出哪些改变。 Plz帮助

1 个答案:

答案 0 :(得分:0)

aptitude或许可以解决此问题。它是一种比apt-get更复杂的依赖管理工具。

您可以使用apt-get:

进行安装
sudo apt-get install aptitude

您可以使用aptitude来安装postgresql

sudo aptitude install postgresql-9.3

如果aptitude遇到任何问题,它会自动设计安装此软件包的可能解决方案。请注意,aptitude可能会建议删除冲突的包。因此,如果aptitude提示您,请仔细阅读提示。