问题描述
我一直在尝试在计算机上安装64位版本的Windows的PostgreSQL PostgreSQL 9.2(Windows 7 64位)并收到此错误:
环境变量COMPSPEC似乎没有指向cmd.exe或存在尾随的半冒号。
我已经
我禁用了防病毒软件(Microsoft Security Essentials)和防火墙。
运行:
%COMSPEC% / C回声测试正常
返回测试正常
我已经检查了我的系统环境变量用于结尾的半冒号,但我找不到。
然后我安装了32位版本,并设法以另一种方式结束安装错误消息指出:安装后步骤运行问题。安装可能无法正确完成读取C:\\ Program Files(x86)\\ PostgreSQL \\ 9.2 \\ data \\ postgresql.conf
时出错,但是没有 postgresql。 conf
该目录中的文件。它确实安装了该应用程序,当我尝试用红色X连接服务器时,它说在底部失败,并且在我输入密码后无法连接。
如何连接到该服务器连接?
ComSpec是有关任何安装失败的通用错误消息。
p>确定问题
- 导航至以下路径
c:\用户\XXXXXX\AppData\Local\Temp - 打开'bitrock_installer_XXXX.log'
- 检查是否出现以下错误:
这是''(例如'\Postgres安装'->'\POSTGR〜1')
有关禁用8.3文件名和目录的Microsoft文章:
解决方案:
- 在管理模式下打开命令提示符
-
执行以下命令以根据驱动器更改格式或所有驱动器
示例命令:
fsutil 8dot3name set 1 -在所有卷上禁用8dot3名称创建
fsutil 8dot3name set C:1-在c上禁用8dot3名称创建:
-
以具有管理员特权的用户身份执行安装
- 安装后,请考虑将8dot3name设置重置为默认值(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?
ComSpec is a generic error message for any installation failure.
Identifying the problem
- Navigate to below pathc:\Users\XXXXXX\AppData\Local\Temp
- Open 'bitrock_installer_XXXX.log'
- Check, if you are getting below error:
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:
- Open command prompt in admin mode
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:
Execute the installation as a user having admin privileges
- After install, consider resetting the 8dot3name setting to default (2) to avoid unintended consequences
Hope it solves the problem!
这篇关于安装PostgreSQL 9.2的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!