我是PostgreSQL的新手,当我试图在我的Windows 10设备上安装PostgreSQL 13 / 14时,我遇到了以下错误。
"The environment variable COMSPEC does not seem to point to the cmd.exe or there is a training semicolon present. Please fix this variable and restart installation."
COMSPEC系统变量
这是我的COMSPEC 环境变量的设置
installbuilder_installer.log
的内容
Log started 05/06/2022 at 17:51:52
Preferred installation mode : qt
Trying to init installer in mode qt
Mode qt successfully initialized
Setting variable whoami from C:\WINDOWS\System32\whoami
Script exit code: 0
Script output:
atrapa\junkwong
Script stderr:
Executing C:\WINDOWS\System32\icacls "C:\Users\junkwong\AppData\Local\Temp/postgresql_installer_c7c2d91f40" /inheritance:r
Script exit code: 0
Script output:
processed file: C:\Users\junkwong\AppData\Local\Temp/postgresql_installer_c7c2d91f40
Successfully processed 1 files; Failed processing 0 files
Script stderr:
Executing C:\WINDOWS\System32\icacls "C:\Users\junkwong\AppData\Local\Temp/postgresql_installer_c7c2d91f40" /T /Q /grant "atrapa\junkwong:(OI)(CI)F"
Script exit code: 0
Script output:
Successfully processed 1 files; Failed processing 0 files
Script stderr:
Executing C:\WINDOWS\System32\cscript //NoLogo "C:\Users\junkwong\AppData\Local\Temp\postgresql_installer_c7c2d91f40\prerun_checks.vbs"
Script exit code: 0
Script output:
The scripting host appears to be functional.
Script stderr:
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-14 Base Directory. Setting variable iBaseDirectory to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-14 Branding. Setting variable iBranding to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-14 Version. Setting variable brandingVer to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-14 Shortcuts. Setting variable iShortcut to empty value
[17:52:01] Using branding: PostgreSQL 14
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-14 SB_Version. Setting variable sb_version to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-14 pgAdmin_Version. Setting variable pgadmin_version to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-14 CLT_Version. Setting variable clt_version to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-14 Data Directory. Setting variable server_data_dir to empty value
Executing C:\Users\junkwong\AppData\Local\Temp/postgresql_installer_c7c2d91f40/temp_check_comspec.bat
Script exit code: 0
Script output:
Script stderr:
Exiting with code 1
而且COMSPEC变量确实是设置为系统变量,而不是用户变量,就像许多帖子所提议的那样。此外,没有尾随分号(;)
我尝试过的:
"%COMSPEC%" /C "echo test ok"
,并获得了"test ok“作为结果请看这里。Command Processor
文件Postgresql 9.4安装/Windows8.1/ COMSPEC问题bitrock_installer_xxxx.log
。非常感谢您的帮助或建议。
祝你今天愉快。
致以敬意,
君康
发布于 2022-07-12 13:48:43
这是https://learn.microsoft.com/en-GB/troubleshoot/windows-server/performance/stop-error-code-0x00000019的一个解决方案,它对我有效。
发布于 2022-06-06 11:40:59
嗨,我遇到了同样的问题,但是后来我把CompSpec的环境变量更改为: ComSpec和path: C:\Windows\system32\cmd.exe,并重新启动了我的pc并成功地安装了它。希望能帮上忙。
发布于 2022-06-07 15:54:35
我也有同样的问题到处找。我试了很多次,但终于找到了一个可行的解决方案。这个问题似乎与8.3文件名的处理有关。我跟踪了提示:https://hub.alfresco.com/t5/alfresco-content-services-forum/solved-installation-error-on-windows-10-x64-registerservice-bat/td-p/209616
或者直接去
与指南相比,我的默认注册表项是2,而不是0。无论如何,将其更改为1(+重新启动)允许COMSPEC-测试通过。似乎是“安装脚本”和"Win10“的问题.
/Björn
https://stackoverflow.com/questions/72271531
复制相似问题