关于数据库:解决Windows2012-R2下安装PostgreSQL报错的问题

18次阅读

共计 2186 个字符,预计需要花费 6 分钟才能阅读完成。

作者:类延良,任职于瀚高根底软件股份有限公司,PostgreSQL 数据库技术爱好者,10g &11g OCM,OGG 认证专家。

一、环境阐明

1.Windows2012R2 的版本见下,未打任何的 OS 补丁

2. 采纳的介质是 postgresql-12.5-1-windows-x64.exe,从 EDB 公司下载的介质,曾经验算过该介质的 SHA256,没问题。

3.PostgreSQL12 x64bit 是反对 Windows 2102R2 的,如下截图来自
https://www.postgresql.org/download/windows/

二、装置报错

三、问题剖析与解决

家喻户晓,在 Windows 下装置部署用 C 开发的程序(比方 OGG,比方 vmware workstations 等等),都须要装置 Microsoft Visual C++ 2015-2019 Redistributable,这个安装包须要阐明如下:

1. 该安装包的下载网址是:
https://support.microsoft.com/en-in/help/2977003/the-latest-supported-visual-c-downloads to view”)

2. 该安装包辨别 x86、x64、ARM64,请留神务必下载正确

3. 该安装包对 Windwos 版本的要求如下,来自于网址
https://docs.microsoft.com/zh-cn/visualstudio/releases/2019/system-requirements

上述网址有如下的形容:

“Visual C++ 2015-2019 Redistributable 反对与 Visual Studio 雷同的零碎要求”,那么就来看 Visual Studio 2019 对操作系统的要求,见下:
Visual Studio 2019 将在以下操作系统上装置并运行(倡议应用 64 位;不反对 ARM):

  • Windows 10 版本 1703 或更高版本:家庭版、专业版、教育版和企业版(不反对 LTSC 和 Windows 10 S)
  • Windows Server 2019:Standard 和 Datacenter
  • Windows Server 2016:Standard 和 Datacenter
  • Windows 8.1(带有更新 2919355):外围板、专业版和企业版
  • Windows Server 2012 R2(更新 2919355):Essentials、Standard、Datacenter
  • Windows 7 SP1(带有最新的 Windows 更新):家庭高级版、专业版、企业版、旗舰版

4.Visual C++ 2015, 2017 and 2019 all share the same redistributable files

For example, installing the Visual C++ 2019 redistributable will affect programs built with Visual C++ 2015 and 2017 also. However, installing the Visual C++ 2015 redistributable will not replace the newer versions of the files installed by the Visual C++ 2017 and 2019 redistributables.

本文摘自:
https://support.microsoft.com/en-in/help/2977003/the-latest-supported-visual-c-downloads

从如上剖析能够看出,Visual C++ 2015-2019 Redistributable 在 Windows2012R2 下装置,须要 Windows2012R2 带有更新 2919355。我特意尝试过当 Windows2012R2 不带任何 OS 补丁的状况上来装置 Visual C++ 2015-2019 Redistributable,后果 OS 蓝屏故障,进而导致 OS 重启,所以,请务必为 Windows2012R2 装置更新 2919355。

上面就来为 Windows2012R2 装置更新 2919355

Windows2012R2 的更新 2919355
(https://support.microsoft.com/kb/2919355) 对应的补丁下载网址

如下是打补丁的程序,请顺次执行即可:

  1. clearcompressionflag.exe
  2. KB2919442
  3. KB2975061 本补丁下载自 http://support.microsoft.com/kb/2975061/
  4. KB2919355 若是不装置 KB2975061,那么在装置 KB2919355 时将装置将失败,事件查看器中的错误代码为 0x80070005。装置 KB2919355 耗时 1 小时,须要重启 OS 失效。
  5. KB2932046,重启 os 失效
  6. KB2959977,重启 os 失效
  7. KB2937592,不须要重启
  8. KB2938439,重启 os 失效
  9. KB2934018,重启 os 失效

以上九个步骤倡议预留至多 2 个小时的工夫进行 OS 补丁更新,请布局好停机工夫。

装置完更新 2919355 之后,再去运行 postgresql-12.5-1-windows-x64.exe 即可。

更多 PostgreSQL 常识问答、技术文章,请拜访 PGFans 问答社区:www.pgfans.cn

正文完
 0