我正在尝试使用 Chef 在 Ubuntu 节点上安装 PostgreSQL(服务器):
角色定义(roles/base_server.rb):
run_list(
"recipe[apt]",
"recipe[postgres::server]"
)
default_attributes(
postgresql: {
version: "9.3.4",
config: {
shared_buffers_mb: "12000"
}
}
设置
系统:Ubuntu 14.04 LTS(GNU/Linux 3.13.0-24-generic x86_64)
厨师版:11.14.6
Postgres 食谱:[3.4.1] ( https://github.com/hw-cookbooks/postgresql )
运行引导命令
刀引导IPADDRESS -x USER -r 'role[base_server]' --sudo
导致以下错误:
* package[readline] action install
* No version specified, and no candidate version available for readline
================================================================================
Error executing action `install` on resource 'package[readline]'
================================================================================
Chef::Exceptions::Package
-------------------------
No version specified, and no candidate version available for readline
Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/postgres/recipes/build.rb
29: package package_name do
30: action :install
31: end
32: end
Compiled Resource:
------------------
# Declared in /var/chef/cache/cookbooks/postgres/recipes/build.rb:29:in `block in from_file'
package("readline") do
action [:install]
retries 0
retry_delay 2
guard_interpreter :default
package_name "readline"
timeout 900
cookbook_name "postgres"
recipe_name "build"
end
我已经尝试通过手动安装 readline 库来解决这个问题,但没有成功。有谁知道如何解决这个问题?