gpt4 book ai didi

PostgreSQL 安装 - 错误加载模块

转载 作者:行者123 更新时间:2023-11-29 11:22:31 25 4
gpt4 key购买 nike

我无法在我们的虚拟服务器上正确地重新安装 PostgreSQL + PostGIS。
安装PostgreSQL进程结束出现如下错误:

"A non-fatal error occurred whilst loading database modules. Please check the installation log in C:...\Temp for details."

日志内容如下:

Loading additional SQL modules...
Executing cscript //NoLogo "C:\Programme\PostgreSQL\9.0\installer\server\loadmodules.vbs" "postgres" "****" "C:\Programme\PostgreSQL\9.0" "C:\Programme\PostgreSQL\9.0\data" 5432
Script exit code: 2

Script output:
Installing the adminpack module in the postgres database...
Executing 'C:\DOKUME~1\Kiesow\LOKALE~1\Temp\rad3C00F.bat'...
Couldn't find the output file...
Failed to install the 'adminpack' module in the 'postgres' database
loadmodules.vbs ran to completion

Script stderr:
Program ended with an error exit code

Error running cscript //NoLogo "C:\Programme\PostgreSQL\9.0\installer\server\loadmodules.vbs" "postgres" "****" "C:\Programme\PostgreSQL\9.0" "C:\Programme\PostgreSQL\9.0\data" 5432 : Program ended with an error exit code

安装完成后,我可以启动 pgAdmin,登录并创建新数据库。在我尝试使用堆栈构建器向导添加 PostGIS 之前,一切看起来都很好。再次安装几乎完成,时间:

"Database creation failed." "Would you like to view the error log " "create_templatepostgis_db_error.txt'?"

此错误日志不存在。我可能会忽略该错误并手动创建模板数据库,这很有效。但是我不能使用像“几何”这样的类型,所以我认为,PostGIS 还不能用。


也许你们中的任何人都知道我可能做错了什么?有什么提示吗?谁能帮我解释错误日志?


我使用 Windows XP、PostgreSQL 9.0 32 位(与 8.4 相同)、PostGIS 1.5。
本系统早先安装了Postgres 8.3 + PostGIS,但是我卸载了,删除了data目录,让安装向导新建了一个posgres windows用户。
也重新启动了几次。
我确实在安装 Postgres 时选择了语言环境而不是 [默认语言环境]。


这是我怀疑的日志的另一部分。一开始就是正确的。也许这有帮助:

Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-9.0 Data Directory. Setting variable iDataDirectory to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-9.0 Base Directory. Setting variable iBaseDirectory to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-9.0 Service ID. Setting variable iServiceName to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-9.0 Service Account. Setting variable iServiceAccount to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-9.0 Super User. Setting variable iSuperuser to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-9.0 Branding. Setting variable iBranding to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-9.0 Version. Setting variable brandingVer to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-9.0 Shortcuts. Setting variable iShortcut to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-9.0 DisableStackBuilder. Setting variable iDisableStackBuilder to empty value
[15:44:31] Existing base directory:
[15:44:31] Existing data directory:
[15:44:31] Using branding: PostgreSQL 9.0
[15:44:31] Using Super User: postgres and Service Account: postgres
[15:44:31] Using Service Name: postgresql-9.0
Executing cscript //NoLogo "C:\Dokumente und Einstellungen\Kiesow\Lokale Einstellungen\Temp\prerun_checks.vbs"
Script exit code: 0

Script output:
The scripting host appears to be functional.

Script stderr:

Executing cscript //NoLogo "C:\Dokumente und Einstellungen\Kiesow\Lokale Einstellungen\Temp\postgresql_installer\installruntimes.vbs" "C:\Dokumente und Einstellungen\Kiesow\Lokale Einstellungen\Temp\postgresql_installer\vcredist_x86.exe"
Script exit code: 3010

Script output:
Executing the runtime installer: C:\Dokumente und Einstellungen\Kiesow\Lokale Einstellungen\Temp\postgresql_installer\vcredist_x86.exe
The runtime package exited with error code: 3010

最佳答案

在命令提示符下,运行这条命令:

C:\Programme\PostgreSQL\9.0\bin\psql.exe -p 5432 -U postgres -W -f C:\Programme\PostgreSQL\9.0\share\contrib\adminpack.sql postgres

它的输出可能会提供更多信息。顺便说一下,运行上面的代码就是 .vbs 正在做的所有事情。

关于PostgreSQL 安装 - 错误加载模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8529004/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com