Chef :: Exceptions :: ChecksumMismatch when installing nginx-1.7.8 from source

I get the following error when starting vagrant up --provision to configure my development environment using a firewall ...

 ==> default: [2014-12-08T20:33:51+00:00] ERROR: remote_file[http://nginx.org/download/nginx-1.7.8.tar.gz] (nginx::source line 58) had an error: Chef::Exceptions::ChecksumMismatch: Checksum on resource (0510af) does not match checksum on content (12f75e) 

My JSON chef has the following for nginx:

 "nginx": { "version": "1.7.8", "user": "deploy", "init_style": "init", "modules": [ "http_stub_status_module", "http_ssl_module", "http_gzip_static_module" ], "passenger": { "version": "4.0.53", "gem_binary": "/home/vagrant/.rbenv/shims/gem" }, "configure_flags": [ "--add-module=/home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/passenger-3.0.18/ext/nginx" ], "gzip_types": [ "text/plain", "text/html", "text/css", "text/xml", "text/javascript", "application/json", "application/x-javascript", "application/xml", "application/xml+rss" ]} 

and Cheffile has the following cookbook:

 cookbook 'nginx' 

How to resolve checksum mismatch?

+7
vagrant nginx centos chef
source share
1 answer

The nginx cookie requires changing the checksum attribute when using a different version of nginx. Resource remote_file causing the error:

 remote_file nginx_url do source nginx_url checksum node['nginx']['source']['checksum'] path src_filepath backup false end 

You need to update the checksum value. In particular, node['nginx']['source']['checksum'] .

So in your JSON you would add this line:

 "source": {"checksum": "insert checksum here" } 

Change As stated in the comments, the checksum is SHA256. You can generate the checksum of the file as follows:

 shasum -a 256 nginx-1.7.8.tar.gz 
+13
source share

All Articles