加入收藏 | 设为首页 | 会员中心 | 我要投稿 阜阳站长网 (https://www.0558zz.com/)- 科技、建站、内容创作、云计算、网络安全!
当前位置: 首页 > 运营中心 > Nginx > 正文

从源安装nginx-1.7.8时,Chef :: Exceptions :: ChecksumMismatch

发布时间:2020-11-18 03:10:45 所属栏目:Nginx 来源:互联网
导读:运行vagrant时出现以下错误 - 使用vagrant设置我的开发环境...== 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 e

运行vagrant时出现以下错误 – 使用vagrant设置我的开发环境…

==> 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)

我的厨师JSON为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"
]}

和Cheffile有以下食谱:

cookbook 'nginx'

如何解决校验和不匹配问题? nginx cookbook要求您在使用其他版本的nginx时编辑校验和属性.导致您出错的remote_file资源是:

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

您需要更新校验和值.特别是节点[‘nginx’] [‘source’] [‘checksum’].

所以在你的JSON中,你会添加这一行:

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

编辑:正如评论中指出的,校验和是SHA256.您可以生成文件的校验和,如下所示:

shasum -a 256 nginx-1.7.8.tar.gz

(编辑:阜阳站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读