Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problems Installing PostgreSQL 9.2

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 COMPSPEC does not seem to point to the cmd.exe or there is a trailing semi colon present.

I've installed it as Administrator.

I disabled the antivirus (Microsoft Security Essentials) and the firewall.

Running:

"%COMSPEC%" /C "echo test ok"

returned test ok

I've checked my System Environment Variables for trailing semi colon and I couldn't find any.

I then installed the 32bit version and managed to get to the end of the install with a different error message stating: Problem running post-install step. Installation may not complete correctly Error reading the C:\Program Files (x86)\PostgreSQL\9.2\data\postgresql.conf but there is no postgresql.conf file in that directory. It did install the application and when I try to connect the server with the red X on it it says fail at the bottom and it won't connect after I type in my password.

How can I connect to this server connection?

like image 976
user2147063 Avatar asked Mar 08 '13 05:03

user2147063


1 Answers

ComSpec is a generic error message for any installation failure.

Identifying the problem

  1. Navigate to below path c:\Users\XXXXXX\AppData\Local\Temp
  2. Open 'bitrock_installer_XXXX.log'
  3. Check, if you are getting below error:

Script stderr: '"C:\Users\XXXXX\AppData\Local\Temp\POSTGR~1\TEMP_C~1.BAT"' is not recognized as an internal or external command, operable program or batch file.

Error running

C:\Users\XXXXX\AppData\Local\Temp/postgresql_installer_47b21c4ea1/temp_check_comspec.bat :
'"C:\Users\XXXXX\AppData\Local\Temp\POSTGR~1\TEMP_C~1.BAT"' is not recognized as an internal or external command,

operable program or batch file.

This is a problem with '8.3 file names and directories' (e.g. '\Postgres Install' -> '\POSTGR~1') Microsoft article on disabling 8.3 file names and directories: https://support.microsoft.com/en-gb/kb/121007

Solution:

  1. Open command prompt in admin mode
  2. Execute following command to change the format based on your drive or all drives

    Sample commands:

    fsutil 8dot3name set 1"      - disable 8dot3 name creation on all volumes
    fsutil 8dot3name set C: 1"   - disable 8dot3 name creation on c:
    
  3. Execute the installation as a user having admin privileges

  4. After install, consider resetting the 8dot3name setting to default (2) to avoid unintended consequences

Hope it solves the problem!

like image 111
Ram Avatar answered Oct 05 '22 23:10

Ram