我从psql: FATAL: role "root" does not exist
运行./createdb.sh
时遇到错误https://github.com/hyperledger/blockchain-explorer
。我正在尝试在Centos上运行区块链资源管理器。
我认为最后一个版本破坏了某些东西,或者使它与某些工具不兼容。
尝试恢复到原始的docker镜像:hyperledger / explorer-db:0.3.8 hyperledger / explorer:0.3.8
这对我来说很有把戏。
运行createdb.sh脚本时,类似的错误“psql:FATAL:role”postgres“不存在”。我想在ubuntu上安装。
我通过运行以下命令修复它:
/home/linuxbrew/.linuxbrew/Cellar/postgresql/11.4/bin$ createuser -s postgres
而不使用sudo运行createdb.sh脚本。
希望这可以帮助别人。
您应该在运行脚本时指定DB用户。
修改explorerconfig.json
下的blockchain-explorer/app
以包含与DB的连接属性,如“host”,“port”,“database”,“username”和“password”。
请参阅他们的github repo中的自述文件 - https://github.com/hyperledger/blockchain-explorer/blob/master/README.md#Database-Setup