Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7489789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T15:22:25+00:00 2026-05-29T15:22:25+00:00

I installed postgres on my VM using Vagrant and Chef and when I try

  • 0

I installed postgres on my VM using Vagrant and Chef and when I try to create the database I keep getting this error. Not sure where to look. The user ‘my_user’ was created without trouble.

CREATE DATABASE db_mydb OWNER my_user ENCODING 'UTF8' TEMPLATE template1;
createdb: database creation failed: ERROR:  encoding UTF8 does not match locale en_US
DETAIL:  The chosen LC_CTYPE setting requires encoding LATIN1.

The VM was initially set to en_US, and I updated it to en_US.utf8

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T15:22:26+00:00Added an answer on May 29, 2026 at 3:22 pm

    When you create the postgresql server, the default encoding is taken from your locale. If you changed the locale to UTF8 later, the server will still be initialised to latin1.

    If you don’t have any data yet, it’s probably best to remove and recreate the server. I’m not sure exactly how to do this on your setup, but basically it should just be a case of shutting it down, deleting the database files and using initdb to recreate them. Or uninstall/reinstall the package.

    If you don’t want to rebuild the server, you can create the database using TEMPLATE template0 which allows you to specify a different encoding to the server default.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I installed Python Mock module using PIP. When I try to import mock running
I'm using Windows XP and I've installed PostgreSQL 8.3.5-2. I can create databases via
I get this error while trying to dump database, i entered linuxuser $ sudo
I'm attempting to launch a GeoDjango app. I've installed Postgres & PostGIS using brew
I'm using CodeIgniter2 + Sparks + PhpActiveRecord, I installed following this tutorial : http://heybigname.com/2011/07/28/codeigniter-2-sparks-php-activerecord-part-1-installation/
I'm using Rails 3.0.1. I installed the native pg gem for postgresql with this
I installed subclipse in eclipse, but I get an error message Expected format '3'
I've been tasked to create a PHP app which accesses an existing PostgreSQL database.
Installed Visual Studio Web Developer 2010 Express from the ISO available from this page:
I installed PyScript to try it out but it just wont start. It only

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.