2017-02-23 79 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