2017-02-23 48 views
0

最近我遇到了使用流行的烹饪书,如mongodbsc-mongodb的mongodb安装问题。我正在使用ubuntu 14.04 vagrant box。在ubuntu下安装使用厨师的mongodb问题14.04

这是我如何使用它:

食谱:sc-mongodb

方药:

include_recipe 'sc-mongodb::default' 

属性:

default['mongodb']['config']['smallfiles'] = true 
default['mongodb']['config']['bind_ip'] = '0.0.0.0' 
default['mongodb']['install_method'] = 'mongodb-org' 

错误:

==> default: [2017-02-23T18:26:27+00:00] INFO: template[/etc/init/mongodb.conf] not queuing delayed action restart on service[mongodb] (delayed), as it's already been queued 
==> default: 
==> default: * apt_package[mongodb-org] action install 
==> default: 
==> default:  ================================================================================ 
==> default:  Error executing action `install` on resource 'apt_package[mongodb-org]' 
==> default:  ================================================================================ 
==> default: 
==> default:  Mixlib::ShellOut::ShellCommandFailed 
==> default:  ------------------------------------ 
==> default:  Expected process to exit with [0], but received '100' 
==> default:  ---- Begin output of ["apt-get", "-q", "-y", "-o", "Dpkg::Options::=\"--force-confold\"", "--force-yes", "install", "mongodb-org=2.6.12"] ---- 
==> default:  STDOUT: Reading package lists... 
==> default:  Building dependency tree... 
==> default:  Reading state information... 
==> default:  The following packages were automatically installed and are no longer required: 
==> default:  chef-zero erubis ohai ruby-diff-lcs ruby-erubis ruby-hashie ruby-highline 
==> default:  ruby-ipaddress ruby-mime-types ruby-mixlib-authentication ruby-mixlib-cli 
==> default:  ruby-mixlib-config ruby-mixlib-log ruby-mixlib-shellout ruby-net-ssh 
==> default:  ruby-net-ssh-gateway ruby-net-ssh-multi ruby-rack ruby-rest-client 
==> default:  ruby-sigar ruby-systemu ruby-yajl 
==> default:  Use 'apt-get autoremove' to remove them. 
==> default:  The following extra packages will be installed: 
==> default:  mongodb-org-mongos mongodb-org-server mongodb-org-shell mongodb-org-tools 
==> default:  The following NEW packages will be installed: 
==> default:  mongodb-org mongodb-org-mongos mongodb-org-server mongodb-org-shell 
==> default:  mongodb-org-tools 
==> default:  0 upgraded, 5 newly installed, 0 to remove and 1 not upgraded. 
==> default:  Need to get 116 MB of archives. 
==> default:  After this operation, 293 MB of additional disk space will be used. 
==> default:  Get:1 http://downloads-distro.mongodb.org/repo/ubuntu-upstart/ dist/10gen mongodb-org-shell amd64 2.6.12 [4479 kB] 
==> default:  Get:2 http://downloads-distro.mongodb.org/repo/ubuntu-upstart/ dist/10gen mongodb-org-server amd64 2.6.12 [9541 kB] 
==> default:  Get:3 http://downloads-distro.mongodb.org/repo/ubuntu-upstart/ dist/10gen mongodb-org-mongos amd64 2.6.12 [7214 kB] 
==> default:  Get:4 http://downloads-distro.mongodb.org/repo/ubuntu-upstart/ dist/10gen mongodb-org-tools amd64 2.6.12 [94.5 MB] 
==> default:  Get:5 http://downloads-distro.mongodb.org/repo/ubuntu-upstart/ dist/10gen mongodb-org amd64 2.6.12 [3650 B] 
==> default:  Fetched 116 MB in 37s (3093 kB/s) 
==> default:  STDERR: dpkg: error: need an action option 
==> default: 
==> default:  Type dpkg --help for help about installing and deinstalling packages [*]; 
==> default:  Use 'apt' or 'aptitude' for user-friendly package management; 
==> default:  Type dpkg -Dhelp for a list of dpkg debug flag values; 
==> default:  Type dpkg --force-help for a list of forcing options; 
==> default:  Type dpkg-deb --help for help about manipulating *.deb files; 
==> default: 
==> default:  Options marked [*] produce a lot of output - pipe it through 'less' or 'more' ! 
==> default:  E: Sub-process /usr/bin/dpkg returned an error code (2) 
==> default:  ---- End output of ["apt-get", "-q", "-y", "-o", "Dpkg::Options::=\"--force-confold\"", "--force-yes", "install", "mongodb-org=2.6.12"] ---- 
==> default:  Ran ["apt-get", "-q", "-y", "-o", "Dpkg::Options::=\"--force-confold\"", "--force-yes", "install", "mongodb-org=2.6.12"] returned 100 
==> default: 
==> default:  Resource Declaration: 
==> default:  --------------------- 
==> default:  # In /var/chef/cache/cookbooks/sc-mongodb/recipes/install.rb 
==> default: 
==> default:  67: package node['mongodb']['package_name'] do 
==> default:  68: options node['mongodb']['packager_options'] 
==> default:  69: action :install 
==> default:  70: version node['mongodb']['package_version'] 
==> default:  71: not_if { node['mongodb']['install_method'] == 'none' } 
==> default:  72: end 
==> default:  73: 
==> default: 
==> default:  Compiled Resource: 
==> default:  ------------------ 
==> default:  # Declared in /var/chef/cache/cookbooks/sc-mongodb/recipes/install.rb:67:in `from_file' 
==> default: 
==> default:  apt_package("mongodb-org") do 
==> default:  package_name "mongodb-org" 
==> default:  action [:install] 
==> default:  retries 0 
==> default:  retry_delay 2 
==> default:  default_guard_interpreter :default 
==> default:  declared_type :package 
==> default:  cookbook_name "sc-mongodb" 
==> default:  recipe_name "install" 
==> default:  options "-o Dpkg::Options::=\"--force-confold\" --force-yes" 
==> default:  not_if { #code block } 
==> default:  end 
==> default: 
==> default:  Platform: 
==> default:  --------- 
==> default:  x86_64-linux 
==> default: 

我试图手动安装我的Ubuntu 14.04游民内的MongoDB和工作得很好。它曾经是在工作之前,但从昨天我看到这些失败。我不确定发生了什么样的变化?有没有人见过类似的问题?

谢谢!

回答

0

这是由于厨师12.19中的一个错误。您现在可以恢复到12.18或等待修复被释放。

编辑:修正了12.19版本现在起来。

+0

有趣。似乎它已经在厨师'12.19.36'(mac)中修复了。我不再看到这个问题,现在一切正常。 @coderanger感谢分享细节。 – niral