I bought an vps (virtual private server) and have installed ubuntu minimal (server) 12.04 32 bit on it for openerp use, and one of the openerp requirement is installing the postgresql

I installed just simply like the usually

sudo apt-get install postgresql

but went I execute this command

 createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt openerp 

in postgres user it said:

postgres@furnia:~$ createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt openerp
Enter password for new role: 
Enter it again: 
createuser: could not connect to database postgres: could not connect to server: No such file or directory
    Is the server running locally and accepting
    connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

and when I restart the postgresql with

/etc/init.d/postgresql restart

it just skipped to next line and do nothing

I start to check the whole postgresql in my server, and I discover that it's different with the desktop version

thanks for helping

  • Which version do you have on each machine? – Jon Hanna May 29 '14 at 23:06
  • "I start to check the whole postgresql in my server, and I discover that it's different with the desktop version". Details? Different how? What's the output of apt-cache policy postgresql and lsb_release -a on both machines? (Edit the question to add the info, comment here when done). – Craig Ringer May 30 '14 at 0:32
  • @Craig Ringer, sorry for late response, I heard from my friend that the 64 bit of ubuntu server is better than 32, and after its installed 64 bit postgresql runs normally. The difference is like the folder postgresql in /etc doesn't exist, and other missing files. – user286647 May 31 '14 at 0:45
  • @ Jon Hanna, 9.1 – user286647 May 31 '14 at 0:45
  • If that's what fixed your problem, you could give it as an answer yourself, as it might help someone else in the future. – Jon Hanna May 31 '14 at 10:01

I discover that the problem is at the locale settings, and simply fixed by command

sudo locale-gen en_US.UTF-8

export LC_CALL=en_US.UTF-8

export LC_ALL=en_US.UTF-8

export LANGUAGE=en_US.UTF-8

export LANG=en_US.UTF-8

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.