---
title: "一些PostgreSQL在Windows2012R2上安装问题的排除"
author: "Cash"
date: "2019-06-30T13:51:11Z"
tags: []
categories: ["操作系统"]
slug: "postgresql-windows2012r2"
draft: false
lastmod: "2019-06-30T13:51:11Z"
id: 2442265
url: "https://cash.iteye.com/blog/2442265"
---

问题现象：
postgresql-11.4-2-windows-x64.exe无法安装，或者提示getlocales错误或者dll文件错误

排除步骤：
1、在安装程序所在目录下，编写一个内含postgresql-11.4-2-windows-x64.exe - -install_runtimes 0 命令的的bat文件运行即可，或者在目录中按住ctrl，右击鼠标，运行命令行，输入postgresql-11.4-2-windows-x64.exe - -install_runtimes 0 安装即可；

2、如果出现there has been an error.Error running C:\Users\Administrator\AppData\Local\Temp\2\postgresql_installer_2516b4ee54\getlocales.exe:child killed:unknown signal.错误，下载安装一个python-37.3-amd64.exe，即可修复该问题；（mark，网上搜索了好多解决方案，下载安装vc++redistrubution、复制dll文件等均不见效，自己摸索了2天才找到排除问题的路径）；


问题摸索过程：
安装postgresql到2台服务器中，结果其中一台pgadmin报错且通过命令方式安装提示getlocales未知错误，运行出现xxxcrtxxxx.dll错误（下载放入system文件夹后问题依旧，并且提示其他dll错误，补齐3个dll后，提示x00000bc），另一台通过命令安装的pgadmin可正常运行。经过测试正常运行pgadmin的服务器中，部署过python3.7.3，经过尝试卸载后，正常服务器也提示错误；