2017-05-08 60 views
2

我得到錯誤Chef: No candidate version available for mod_security2而包括package mod_securitypackage mod_security2廚師:沒有可用的候選版本mod_security2的Ubuntu 16.04

這裏被剪斷堆棧跟蹤:

 * No candidate version available for mod_security2 
     ================================================================================ 
     Error executing action `install` on resource 'apt_package[mod_security2]' 
     ================================================================================ 

     Chef::Exceptions::Package 
     ------------------------- 
     No candidate version available for mod_security2 

     Resource Declaration: 
     --------------------- 
     # In <snipped> 

     13: package 'mod_security2' 
     14: 

     Compiled Resource: 
     ------------------ 
     # Declared in <snipped> `from_file' 

     apt_package("mod_security2") do 
     package_name "mod_security2" 
     action [:install] 
     default_guard_interpreter :default 
     declared_type :package 
     cookbook_name "mod_secure" 
     recipe_name "default" 
     end 

     System Info: 
     ------------ 
     chef_version=13.0.118 
     platform=ubuntu 
     platform_version=16.04 
     ruby=ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux] 
     program_name=chef-client worker: ppid=16061;start=17:30:57; 
     executable=/opt/chef/bin/chef-client 

回答

1

這意味着沒有可用版本的包中易於。您可能會錯過apt-get update。在你的基本配方或任何最接近你的是添加apt_update

+0

這不是問題,因爲配方包括'apt_update' – ducktyped

+0

然後你確定包是否存在? – coderanger

+0

默認情況下,它是Ubuntu/Debian上的'libapache2-mod-security2'。 –

相關問題