PostgreSQL install error UTF

Document ID : KB000123442
Last Modified Date : 20/12/2018
Show Technical Document Details
Issue:
Create Database Failed Status: ERROR Additional Notes: ERROR - createdb: database creation failed: ERROR: encoding "UTF8" does not match locale "en_US.ISO8859-1" DETAIL: The chosen LC_CTYPE setting requires encoding "LATIN1".
(STDOUT: setting path from dbinstalldir /opt/xxx/CA-APM/PostgreSQL PATH is <PATH_VALUES> LD_LIBRARY_PATH is <LD_LIBRARY_PATH_VALUES>
Creating user admin CREATE ROLE Creating database cemdb with the admin user as the owner. Create Database failed with exit code 1 ) 11/12/2018 14:26:21:137 Custom Action: com.wily.introscope.installer.plugin.LogErrorMessage Status: SUCCESSFUL
Resolution:
set the LC_ALL. If you use bash as your shell, you can put these lines in your ~/.bashrc and ~/.profile files:
export LC_ALL=en_US.utf-8
export LANG=en_US.utf-8
export LANGUAGE=en_US.utf-8
To make these changes active in the current shell, source the .bashrc:
$ source ~/.bashrc
 
Verify set with locale command
re-ran the install again and it worked.