gpt4 book ai didi

postgresql - psql:致命:角色 "vagrant"不存在

转载 作者:行者123 更新时间:2023-11-29 11:13:16 25 4
gpt4 key购买 nike

<分区>

我创建了一个 vagrant 实例,每次我尝试在终端中执行 psql 时都会收到此错误 如何修复它。错误如状态:

psql: FATAL: 角色“vagrant”不存在

我以为 vagrant 会处理这个?这是我的 vagrant 文件:

Vagrant.require_plugin "vagrant-omnibus"
Vagrant.require_plugin "vagrant-berkshelf"

Vagrant.configure(2) do |config|

# Box config
config.vm.box = 'precise64'
config.vm.box_url = 'http://files.vagrantup.com/precise64.box'

# Plugin config
config.omnibus.chef_version = :latest
config.berkshelf.enabled = true

# Network config
config.vm.network :forwarded_port, guest: 3000, host: 3000

# Virtual config
config.vm.provider(:virtualbox) do |vb|
vb.customize [
"modifyvm", :id,
"--memory", "1024",
"--cpus", "4"
]
end

# Provisioner config
config.vm.provision :chef_solo do |chef|
chef.add_recipe 'apt'
chef.add_recipe 'postgresql::client'
chef.add_recipe 'postgresql::server'
chef.add_recipe 'build-essential'
chef.add_recipe 'rvm::system'
chef.add_recipe 'git'
chef.json = {
:postgresql => {
:version => '9.3'
},
"postgresql" => {
"password" => {
"postgres" => "kshgfi3ret3hihjfbkivtbo3ity835"
}
},
"database" => {
"create" => ["aisisplatform"]
},
:git => {
:prefix => "/usr/local"
},
:rvm => {
'rubies' => [ 'ruby-2.1.0' ],
'default_ruby' => 'ruby-2.1.0',
'vagrant' => {
:system_chef_solo => '/usr/bin/chef-solo'
}
},
}
end
end

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com