sous-chefs / nginx

Development repository for the nginx cookbook
https://supermarket.chef.io/cookbooks/nginx
Apache License 2.0
553 stars 806 forks source link

Install fails on Amazon Linux 2 AMI #471

Closed rohityadav225 closed 5 years ago

rohityadav225 commented 5 years ago

Cookbook version

8.1.6

Chef-client version

13.10.4 and 14.7.17

Platform Details

Amazon Linux 2 AMI

Scenario:

Trying to converge my cookbook which depends on nginx cookbook

Steps to Reproduce:

driver:
  name: ec2

provisioner:
  name: chef_zero
  product_name: chef
  product_version: 14.7.17

platforms:
  - name: amazon
    driver:
      image_id: ami-013be31976ca2c322

Expected Result:

Converge successfully

Actual Result:

It doesn't converge. Below is the error:

Recipe: nginx::package
         * yum_package[nginx] action install

           ================================================================================
           Error executing action `install` on resource 'yum_package[nginx]'
           ================================================================================

           Mixlib::ShellOut::ShellCommandFailed
           ------------------------------------
           Expected process to exit with [0], but received '1'
           ---- Begin output of ["yum", "-y", "install", "nginx-0:1.14.1-1.el6.ngx.x86_64"] ----
           STDOUT: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
           Resolving Dependencies
           --> Running transaction check
           ---> Package nginx.x86_64 0:1.14.1-1.el6.ngx will be installed
           --> Processing Dependency: libpcre.so.0()(64bit) for package: nginx-1.14.1-1.el6.ngx.x86_64
           --> Finished Dependency Resolution
            You could try using --skip-broken to work around the problem
            You could try running: rpm -Va --nofiles --nodigest
           STDERR: Error: Package: nginx-1.14.1-1.el6.ngx.x86_64 (nginx)
               Requires: libpcre.so.0()(64bit)
           ---- End output of ["yum", "-y", "install", "nginx-0:1.14.1-1.el6.ngx.x86_64"] ----
           Ran ["yum", "-y", "install", "nginx-0:1.14.1-1.el6.ngx.x86_64"] returned 1

           Resource Declaration:
           ---------------------
           # In /tmp/kitchen/cache/cookbooks/nginx/recipes/package.rb

            43: package node['nginx']['package_name'] do
            44:   options package_install_opts
            45:   notifies :reload, 'ohai[reload_nginx]', :immediately if node['nginx']['ohai_plugin_enabled']
            46: end
            47:

           Compiled Resource:
           ------------------
           # Declared in /tmp/kitchen/cache/cookbooks/nginx/recipes/package.rb:43:in `from_file'

           yum_package("nginx") do
             package_name "nginx"
             action [:install]
             default_guard_interpreter :default
             declared_type :package
             cookbook_name "nginx"
             recipe_name "package"
             options nil
           end

           System Info:
           ------------
           chef_version=14.7.17
           platform=amazon
           platform_version=2
           ruby=ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux]
           program_name=/opt/chef/bin/chef-client
           executable=/opt/chef/bin/chef-client
rohityadav225 commented 5 years ago

@tas50 Is this something that has been fixed in v9.0.0 ?

damacus commented 5 years ago

This should be fixed after we merged #486 in.

Please reopen if it isn't fixed!

avinash-karthik commented 5 years ago

Hi, seems like this issue is not fixed yet. I'm also facing the same issue with Amazon Linux 2 nodes and the error I get is

STDERR: Error: Package: nginx-1.16.0-1.el6.ngx.x86_64 (nginx)
           Requires: libpcre.so.0()(64bit)
---- End output of ["yum", "-y", "install", "nginx-0:1.16.0-1.el6.ngx.x86_64"] ----
Ran ["yum", "-y", "install", "nginx-0:1.16.0-1.el6.ngx.x86_64"] returned 1
mputilin commented 4 years ago

Didn't fixed for 9.x and seams like 10.x require chef 13.