Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/database/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux 在ubuntu上安装postgresql_Linux_Database_Postgresql_Ubuntu - Fatal编程技术网

Linux 在ubuntu上安装postgresql

Linux 在ubuntu上安装postgresql,linux,database,postgresql,ubuntu,Linux,Database,Postgresql,Ubuntu,当我试图在Ubuntu操作系统上运行命令安装Postgres数据库时,我遇到以下错误sudo apt get install postgresql-9.4 dpkg:处理程序包postgresql-9.4(--configure)时出错: 子流程安装的安装后脚本返回错误退出 状态2 dpkg:依赖关系问题阻止配置 postgresql-contrib-9.4:postgresql-contrib-9.4取决于 postgresql-9.4(=9.4.11-1.pgdg16.04+1);然而,一揽

当我试图在Ubuntu操作系统上运行命令安装Postgres数据库时,我遇到以下错误sudo apt get install postgresql-9.4

dpkg:处理程序包postgresql-9.4(--configure)时出错: 子流程安装的安装后脚本返回错误退出 状态2 dpkg:依赖关系问题阻止配置 postgresql-contrib-9.4:postgresql-contrib-9.4取决于 postgresql-9.4(=9.4.11-1.pgdg16.04+1);然而,一揽子计划 postgresql-9.4尚未配置。dpkg:错误处理包 postgresql-contrib-9.4(--配置):依赖关系问题-离开 未配置没有写入apport报告,因为错误消息 表示它是以前失败的后续错误。错误是 处理时遇到:postgresql-9.4 postgresql-contrib-9.4 E: 子进程/usr/bin/dpkg返回错误代码(1)


如果您尝试了几种解决方案,您可能会有一些尝试后的遗留问题。 要从头开始,您必须在尝试任何操作之前卸载所有内容并清理系统:

sudo apt获取清除“postgresql.*”

这将卸载所有软件包并删除所有配置文件。 注意:这也将从系统中删除所有数据库文件

之后,您必须检查已添加到系统中的存储库。 检查/etc/apt/sources.list文件和/etc/apt/sources.list.d/目录中的所有其他文件

删除所有与postgresql和“pgdg”相关的内容

最后,您可以在此处遵循postgresql官方手册:

谢谢您的回复,我已经按照您的说法使用了postgresql官方手册,仍然有相同的错误!。可能是您破坏了其他一些与postgresql无关的包。一、 e perl模块。您是否尝试过:apt获取更新和apt获取升级?是的,我尝试过。现在,当我升级此错误“dpkg:error processing package postgresql-contrib-9.5(-configure)时:依赖项问题-保留未配置的未写入apport报告,因为错误消息表明它是以前失败的后续错误。处理时遇到错误:postgresql-9.5 postgresql-contrib-9.5 E:Sub-p进程/usr/bin/dpkg返回错误代码(1)”