记一次Kali安装GVM(OpenVAS)中Postgres数据库版本错误

问题描述

安装GVM执行完gvm-setup成功后运行gvm-check-setup错误:

WARNING:  database "postgres" has a collation version mismatch DETAIL:  The database was created using collation version 2.37, but the operating system provides version 2.38. HINT:  Rebuild all objects in this database that use the default collation and run ALTER DATABASE postgres REFRESH COLLATION VERSION, or build PostgreSQL with the right library version.

ERROR: The Postgresql DB does not exist.

FIX: Run 'sudo runuser -u postgres -- /usr/share/gvm/create-postgresql-database'   ERROR: Your GVM-23.11.0 installation is not yet complete!

解决方法

  1. 进入Postgres CLIsudo -u postgres psql
  2. 重建使用默认排序规则的所有对象ALTER DATABASE postgres REFRESH COLLATION VERSION;
  3. 重新check即可,安装完后需要创建一个用户