Chef:Ubuntu 16.04的mod_security2没有候选版本

时间:2017-05-08 17:39:32

标签: chef chef-recipe mod-security mod-security2

我在收到Chef: No candidate version available for mod_security2package mod_security

时收到错误package mod_security2

这是剪切的堆栈跟踪:

       * 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 个答案:

答案 0 :(得分:1)

这意味着apt中没有可用的软件包版本。您可能遗漏了apt-get update。在您的基本配方或您最接近的配方中添加apt_update