postgresql – 流浪汉中的postgres(ubuntu14.04)

postgresql – 流浪汉中的postgres(ubuntu14.04),第1张

概述我尝试用流浪汉创建简单的开发环境但是在postgres中遇到问题. 我的Vagrantfile很简单: # -*- mode: ruby -*-# vi: set ft=ruby :# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!VAGRANTFILE_API_VERSION = 我尝试用流浪汉创建简单的开发环境但是在postgres中遇到问题.

我的Vagrantfile很简单:

# -*- mode: ruby -*-# vi: set ft=ruby :# Vagrantfile API/Syntax version. Don't touch unless you kNow what you're doing!VAGRANTfile_API_VERSION = "2"Vagrant.configure(VAGRANTfile_API_VERSION) do |config|  config.vm.Box = "ubuntu/trusty64"  config.vm.network "forwarded_port",guest: 8000,host: 8000  config.vm.network :public_network  config.vm.provision "ansible" do |ansible|    ansible.playbook = "playbook.yml"  endend

我使用ansible提供:

- name: Configure development machine  hosts: all  sudo: True  tasks:    - name: install postgres      apt: name={{ item }} update_cache=yes      with_items:        - postgresql         - postgresql-contrib

但出了问题,postgres安装不正确

当我ssh到VM,我看到奇怪的事情:

$/etc/init.d/postgresql startperl: warning: Setting locale Failed.perl: warning: Please check that your locale settings:        LANGUAGE = (unset),LC_ALL = (unset),LC_TIME = "uk_UA.UTF-8",LC_MONETARY = "uk_UA.UTF-8",LC_ADDRESS = "uk_UA.UTF-8",LC_TELEPHONE = "uk_UA.UTF-8",LC_name = "uk_UA.UTF-8",LC_MEASUREMENT = "uk_UA.UTF-8",LC_IDENTIFICATION = "uk_UA.UTF-8",LC_NUMERIC = "uk_UA.UTF-8",LC_PAPER = "uk_UA.UTF-8",LANG = "en_US.UTF-8"    are supported and installed on your system.perl: warning: Falling back to the standard locale ("C").psql: Could not connect to server: No such file or directory        Is the server running locally and accepting

并且没有/ etc / postgresql目录(但是/ etc / postgresql-common存在)有什么想法吗?

Github repo

将以下行添加到shell启动文件
LANGUAGE=en_US.UTF-8LANG=en_US.UTF-8LC_ALL=en_US.UTF-8

然后运行(使用root权限)

locale-gen en_US.UTF-8dpkg-reconfigure locales
总结

以上是内存溢出为你收集整理的postgresql – 流浪汉中的postgres(ubuntu14.04)全部内容,希望文章能够帮你解决postgresql – 流浪汉中的postgres(ubuntu14.04)所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/sjk/1181216.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-02
下一篇 2022-06-02

发表评论

登录后才能评论

评论列表(0条)

保存