3

Chef: No candidate version available for mod_security2包含package 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
4

1 回答 1

2

这意味着 apt 中没有可用的软件包版本。您可能缺少一个apt-get update. 在您的基本配方或任何最接近的配方中添加apt_update

于 2017-05-08T19:40:48.467 回答