主要遇到以下兩個問題
一個是在安裝時報錯
Problem running post-install step. Installation may not complete correctlyThe database cluster initialisation failed.
一個是在初始化時報錯
The program "postgres" was found by "initdb" but was not the same version as initdb.
出現問題的原因是曾經修改過 cmd 的編碼格式
解決步驟:
-
win+R
-
輸入 regedit
-
找到
計算機\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor
-
將 Autorun 置空
-
重新安裝 Postgresql