Problems Installing PostgreSQL 9.2

前端 未结 11 1679
野趣味
野趣味 2020-12-15 12:05

I\'ve been trying to install the 64bit version of PostgreSQL 9.2 for Windows on my machine (Windows 7 64bit) and get this error:

The environment variable COMPS

相关标签:
11条回答
  • 2020-12-15 13:00

    Open Environment Variables, you can do this on Windows 7 by typing environment variables in the Search program and files bar when pressing the start button at the bottom left of the desktop. And create a new System Variable(in the 'System Variable' instead of 'User Variable' section).

    In the variable name, enter ComSpec and then in the variable value , enter C:\Windows\system32\cmd.exe.

    That's all. Hope it works! Alternative fix:

    If you already got the ComSpec variable in the System Variable section, remove the ; at the end of it this should fix it.

    0 讨论(0)
  • 2020-12-15 13:01

    Very easy fix:

    1. Just open Advanced System Settings in Control Panel and create a new System Variable( in the System Variable instead of User Variable section).

    2. In the variable name, enter ComSpec and then in the variable value , enter C:\Windows\system32\cmd.exe.

    Alternative fix:

    If you have already the ComSpec variable in the System Variable section, remove the ;at the end of it this should fix it.

    0 讨论(0)
  • 2020-12-15 13:01

    I got the same problem, and i found in the log:

    Script stderr: 'C:\Users\S300' is not recognized as an internal or external command, operable program or batch file.

    Error running C:\Users\S300 (i5)\AppData\Local\Temp/postgresql_installer_56caeadbd6/temp_check_comspec.bat : 'C:\Users\S300' is not recognized as an internal or external command, operable program or batch file.

    I change in User Variables TEMP to D:\TEMP and TMP to D:\TEMP. And Solved My Problem.

    0 讨论(0)
  • 2020-12-15 13:03

    I had a similar problem. After installation, the data folder contained no postgres.conf file. It only contained a single folder named "pg_log". I described the solution that I used here: Postgres Installation Error reading file postgresql.conf

    Basically, it would be helpful to check if the user has full permissions for the postgres folder, and run "init_db" and "pg_ctl start" commands again. If the path contains a space character, try using a relative path for the pg_ctl data folder argument.

    0 讨论(0)
  • 2020-12-15 13:04

    In my case , the Installer was in %USERPROFILE%\DownloadsP{ Windows download folder}, I moved the installer to desktop and ran again. weird it worked lol.

    0 讨论(0)
提交回复
热议问题