Environment

Proxmox and LXC

Problem

The installation of the NetVizura package fails with the aforementioned error.

Cause

Postgres in LXC uses C locale instead of UTF8 which is by default in VM environments.

Solution

For each and every database execute next query:

update pg_database set encoding = pg_char_to_encoding('UTF8') where datname = 'database_name';  For each and every database

Example

 sudo -u postgres psql -c "update pg_database set encoding = pg_char_to_encoding('UTF8') where datname = 'template0';"

 sudo -u postgres psql -c "update pg_database set encoding = pg_char_to_encoding('UTF8') where datname = 'template1';"

 sudo -u postgres psql -c "update pg_database set encoding = pg_char_to_encoding('UTF8') where datname = 'postgres';"


  • No labels