无法安装 PostgreSQL:执行 Microsoft VC 时出错; Windows XP 上的运行时安装程序

发布于 2024-10-05 01:00:20 字数 219 浏览 4 评论 0原文

我从官方网站下载了安装程序 postgresql-9.0.1-1-windows.exe,运行它,然后出现错误:

执行 Microsoft VC++ 运行时安装程序时发生错误

此错误消息的原因是什么?

平台:Windows XP SP3、Dell Inspiron 1501。处理器:AMD Sempron 3500+

I downloaded installer postgresql-9.0.1-1-windows.exe from the official site, ran it, and then got an error:

An error occurred executing the Microsoft VC++ runtime installer

What is the reason for this error message?

Platform: Windows XP SP3, Dell Inspiron 1501. Processor: AMD Sempron 3500+

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(14

温柔一刀 2024-10-12 01:00:21

发生这种情况的原因之一是安装程序尝试安装比您当前使用的版本更旧的 VC++ 运行时版本。

查看此安装日志,可在用户的临时目录中找到(例如 dd_vcredist_amd64_20190214193107.log):

[20C0:20E4][2019-02-14T19:31:07]e000:错误 0x80070666:安装较新版本时无法安装产品。

解决方法是防止运行时与 --install_runtimes 选项:

postgresql-9.6.12-1-windows-x64.exe --install_runtimes 0

One of the reasons this can happen is because the installer attempts to install an older version of the VC++ runtime than what you are currently using.

See this installation log, found in your user's temporary directory (e.g. dd_vcredist_amd64_20190214193107.log):

[20C0:20E4][2019-02-14T19:31:07]e000: Error 0x80070666: Cannot install a product when a newer version is installed.

A workaround is to prevent the runtimes from installing with the --install_runtimes option:

postgresql-9.6.12-1-windows-x64.exe --install_runtimes 0
明月松间行 2024-10-12 01:00:21
  1. 创建下载文件的快捷方式:

    在此处输入图像描述

  2. 右键单击快捷方式 → 属性快捷方式。将 --install_runtimes 0 添加到文件路径末尾:

    在此处输入图像描述

  1. Create a shortcut of the downloaded file:

    Enter image description here

  2. Right click of the shortcut → PropertiesShortcut. Add --install_runtimes 0 to the end of the file path:

    Enter image description here

揽月 2024-10-12 01:00:21
  • 创建 EXE 文件的快捷方式;
  • 右键单击快捷方式→在目标路径末尾添加--install_runtimes 0,例如:

    postgresql-9.3.1-1-windows-x64.exe --install_runtimes 0
    
  • 保存并运行:)

  • Create a shortcut of your EXE file;
  • right click on the shortcut → add --install_runtimes 0 at the end of the target path, e.g.:

    postgresql-9.3.1-1-windows-x64.exe --install_runtimes 0
    
  • save and run it :)

回梦 2024-10-12 01:00:21

首先从 Microsoft 网站下载并安装 Microsoft Visual C++。然后使用 --install_runtimes 0 从命令运行安装。

First download and install Microsoft Visual C++ from the Microsoft website. Then run the installation from command with --install_runtimes 0.

晨曦÷微暖 2024-10-12 01:00:21

我遇到了类似的问题,并在 Garrett_H 的论坛帖子中找到了对我有用的修复:

http://forums.enterprisedb.com/posts/list/1747.page#6180

转到文件 %windir%\inf\wsh.inf,右键单击并选择“安装”

重新运行 postgresql 安装程序

我正在运行 Windows XP Pro,并且我正在尝试安装 postgresql-8.3.17-1- windows.exe。我最初收到以下错误:

执行 Microsoft C++ 运行时安装程序时出错。

I was having a similar issue and found a fix that worked for me from Garrett_H in this forum post:

http://forums.enterprisedb.com/posts/list/1747.page#6180

Go to file %windir%\inf\wsh.inf, right click and select 'Install'

re-run postgresql installer

I'm running Windows XP Pro, and I was trying to install postgresql-8.3.17-1-windows.exe. I originally received the following error:

An error occurred executing the Microsoft C++ runtime installer.

一身软味 2024-10-12 01:00:21

就我而言,当我在 Windows 10 上安装 postgresql-11.0-1-windows-x64.exe 时,我遇到了同样的问题。

我刚刚卸载了 Microsoft Visual C++ Redistributable(32 位和 64 位的最新版本),然后尝试再次安装 postgresql-11.0-1-windows-x64.exe,它对我有用。

In my case, when I was installing postgresql-11.0-1-windows-x64.exe on Windows 10, I had faced the same problem.

I just uninstalled the Microsoft Visual C++ Redistributable (the latest one for both 32 and 64 bit) and then tried to install postgresql-11.0-1-windows-x64.exe again, and it worked for me.

同展鸳鸯锦 2024-10-12 01:00:21

我也面临同样的问题。我通过以下方式修复了它:

  1. 我访问了以下网站:
    https://www.enterpriseb.com/downloads/postgres-postgresql-downloads
  2. 选择适用于 Windows x86-64 的 PostgreSQL 版本 11.1 下的下载按钮。

一句话,尽量安装最新版本。

I too faced the same issue. I fixed it in the following way:

  1. I visited the below site:
    https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
  2. Choose the Download button under PostgreSQL Version 11.1 for Windows x86-64.

In one word, just try to install the latest version.

余罪 2024-10-12 01:00:21

尝试以管理员身份安装(使用以管理员身份运行)。

在9.0版本中。 PostgreSQL 可以作为 Windows 管理员安装:)

Try installing as administrator (using Run as administrator).

In version 9.0. PostgreSQL can be installed as a Windows administrator :)

七色彩虹 2024-10-12 01:00:21

检查是否启用了 Windows 脚本宿主 (WSH)。如果未启用,详细信息如下:没有 WSH 的 Windows 上的 PostgreSQL 安装问题

Check if Windows Script Host (WSH) is enabled. If not enabled, details are here: PostgreSQL Installation Problem on Windows without WSH

我纯我任性 2024-10-12 01:00:21

请特别注意 Windows 用户的文件夹名称不包含空格。 PostgreSQL(从版本 9.2.2.1 开始)对此的处理很差。如果我在 Windows XP 上使用此帐户,安装会失败,并显示“执行 Microsoft C++ 运行时安装程序时发生错误”消息:

"C:\Documents and settings\Jimmy (admin)"

但它运行得很好:

"C:\Documents and settings\Jimmy-admin"

“文档和设置”中的空格似乎不会打扰安装程序。去算算吧。

Take special care that your Windows user's folder name does not contain spaces. PostgreSQL (as of version 9.2.2.1) handles that poorly. If I use this account on Windows XP, installation fails with the "An error occurred executing the Microsoft C++ runtime installer" message:

"C:\Documents and settings\Jimmy (admin)"

But it runs just fine with this:

"C:\Documents and settings\Jimmy-admin"

The spaces in "Documents and settings" don't seem to bother the installer. Go figure.

送你一个梦 2024-10-12 01:00:21

转到文件 %windir%\inf\wsh.inf,右键单击,然后选择“安装”。

然后重新运行 PostgreSQL 安装程序。

这适用于带有 PostgreSQL 8.4.17-1 的 Windows XP。

Go to file %windir%\inf\wsh.inf, right click, and select 'Install'.

Then re-run the PostgreSQL installer.

This works on Windows XP with PostgreSQL 8.4.17-1.

浮生面具三千个 2024-10-12 01:00:21

Windows 脚本宿主 (WSH) 无法执行 VBScript 脚本。如果脚本主机被禁用(这是不寻常的),或者安装被破坏,则可能会发生这种情况。此问题的迹象是类似的消息

CScript 错误:找不到脚本“C:....”的脚本引擎“VBScript”

通常可以通过重新注册 VBScript 解释器来解决,单击开始 * → * 运行 并输入遵循以下内容并单击确定

regsvr32 %systemroot%\system32\vbscript.dll

Windows Script Host (WSH) is unable to execute VBScript scripts. This can occur if the scripting host is disabled (which is unusual), or if the installation is broken. A sign of this problem is a message like

CScript Error: Can't find script engine "VBScript" for script "C:....

It can often be resolved by re-registering the VBScript interpreter, click Start * → * Run and enter the following and click OK:

regsvr32 %systemroot%\system32\vbscript.dll
凉栀 2024-10-12 01:00:21

我在尝试安装 PostgreSQL 11.1 版时遇到了同样的问题。我必须卸载 Microsoft VC++ 并再次运行安装程序。它下载了所需的VC++并且安装成功。

I had the same problem while trying to install PostgreSQL version 11.1. I had to uninstall the Microsoft VC++ and run the installer again. It downloaded the required VC++ and the installation went successful.

长不大的小祸害 2024-10-12 01:00:21

我遇到了这些相同的问题,并尝试

  • 在 postgres上手动安装 MS VC++
  • 绕过 VC++ 安装
  • 修复 Windows 更新服务

仍然不成功

然后我通过手动安装 postgres 解决了这些问题:

  • 将 PostgreSQL 安装内容提取到 C:\PostgreSQL(您可以从成功安装中复制其他机器)
  • 将 C:\PostgreSQL\bin 添加到 PATH 环境
  • 运行 pg_ctl register -DD:\pgdata -N postgresql -U postgres -P

I had these same problems and tried

  • manually installing MS VC++
  • bypassing VC++ installation on postgres
  • fixing windows update service

Still unsuccessful

Then I solved these problem by installing postgres manually:

  • extract the PostgreSQL installation contents to C:\PostgreSQL (you can copy from successful installation on other machines)
  • add C:\PostgreSQL\bin to PATH environment
  • run pg_ctl register -D D:\pgdata -N postgresql -U postgres -P <your postgres password>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文