No final, isso se tornou um problema de proxy. Depois de definir as variáveis de ambiente http_proxy e https_proxy, tudo correu bem. Até este momento eu só tinha apt configurado para usar o proxy.
Estou tentando instalar o foreman em uma máquina Debian Wheezy. Quando eu sigo o guia no theforeman.org, recebo o seguinte erro do instalador:
root@server:/tmp# foreman-installer
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in 'require': iconv will be deprecated in the future, use String#encode instead.
Removing mount files: /etc/puppet/files does not exist or is not a directory
/Stage[main]/Foreman::Plugin::Setup/Foreman::Plugin[setup]/Package[ruby-foreman-setup]/ensure: change from absent to present failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install ruby-foreman-setup' returned 100: Reading package lists...
Installing Done [100%] [....................................................]
Something went wrong! Check the log for ERROR-level output
The full log is at /var/log/foreman-installer/foreman-installer.log
O arquivo /var/log/foreman-installer/foreman-installer.log não mostra nada mais útil:
# grep ERROR /var/log/foreman-installer/foreman-installer.log
[ERROR 2014-05-27 11:35:11 main] Removing mount files: /etc/puppet/files does not exist or is not a directory
[ERROR 2014-05-27 11:35:33 main] /Stage[main]/Foreman::Plugin::Setup/Foreman::Plugin[setup]/Package[ruby-foreman-setup]/ensure: change from absent to present failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install ruby-foreman-setup' returned 100: Reading package lists...
Quando eu executo o comando apt-get com a depuração eu recebo isso:
# DEBUG=1 /usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install ruby-foreman-setup
Reading package lists...
Building dependency tree...
Reading state information...
ruby-foreman-setup is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up ruby-foreman-setup (2.0.4) ...
+ . /usr/share/debconf/confmodule
+ [ ! ]
+ PERL_DL_NONLAZY=1
+ export PERL_DL_NONLAZY
+ [ ]
+ exec /usr/share/debconf/frontend /var/lib/dpkg/info/ruby-foreman-setup.postinst configure
+ . /usr/share/debconf/confmodule
+ [ ! 1 ]
+ [ -z ]
+ exec
+ [ ]
+ exec
+ DEBCONF_REDIR=1
+ export DEBCONF_REDIR
+ LOGFILE=/var/log/foreman-install.log
+ PLUGIN=foreman_bootdisk
+ trap db_stop EXIT
+ cd /usr/share/foreman
+ [ ! -z 1 ]
+ bundle show foreman_bootdisk
+ bundle install
Fetching gem metadata from https://rubygems.org/
Query List: ["rails", "json", "rest-client", "audited-activerecord", "will_paginate", "ancestry", "scoped_search", "net-ldap", "uuidtools", "apipie-rails", "rabl", "oauth", "deep_cloneable", "foreigner", "safemode", "ruby_parser", "fog", "fog-core", "unf", "foreman_bootdisk", "pg", "rbvmomi", "fast_gettext", "gettext_i18n_rails", "gettext_i18n_rails_js", "i18n_data", "foreman_setup"]
Query Gemcutter Dependency Endpoint API: rails json rest-client audited-activerecord will_paginate ancestry scoped_search net-ldap uuidtools apipie-rails rabl oauth deep_cloneable foreigner safemode ruby_parser fog fog-core unf foreman_bootdisk pg rbvmomi fast_gettext gettext_i18n_rails gettext_i18n_rails_js i18n_data foreman_setup
Fetching from: https://rubygems.org/api/v1/dependencies?gems=rails,json,rest-client,audited-activerecord,will_paginate,ancestry,scoped_search,net-ldap,uuidtools,apipie-rails,rabl,oauth,deep_cloneable,foreigner,safemode,ruby_parser,fog,fog-core,unf,foreman_bootdisk,pg,rbvmomi,fast_gettext,gettext_i18n_rails,gettext_i18n_rails_js,i18n_data,foreman_setup
HTTP Success
Query List: ["activerecord", "audited", "jeweler", "appraisal", "sqlite3", "fog-brightbox", "nokogiri", "fog-json", "net-ssh", "net-scp", "mime-types", "multi_json", "formatador", "excon", "builder", "ruby-hmac", "unicode", "named-parameters", "google-api-client", "deface", "gettext", "po_to_json", "activesupport", "hoe", "newgem", "actionpack", "rack", "rake-compiler", "bundler", "railties", "actionmailer", "activeresource", "sprockets-rails", "activemodel", "actionview", "rake", "actionwebservice", "trollop", "cdb-full", "tokyocabinet", "ffi", "netrc", "rdoc", "sexp_processor", "ParseTree", "ruby2ruby", "unf_ext", "rspec", "launchy"]
Query Gemcutter Dependency Endpoint API: activerecord audited jeweler appraisal sqlite3 fog-brightbox nokogiri fog-json net-ssh net-scp mime-types multi_json formatador excon builder ruby-hmac unicode named-parameters google-api-client deface gettext po_to_json activesupport hoe newgem actionpack rack rake-compiler bundler railties actionmailer activeresource sprockets-rails activemodel actionview rake actionwebservice trollop cdb-full tokyocabinet ffi netrc rdoc sexp_processor ParseTree ruby2ruby unf_ext rspec launchy
Fetching from: https://rubygems.org/api/v1/dependencies?gems=activerecord,audited,jeweler,appraisal,sqlite3,fog-brightbox,nokogiri,fog-json,net-ssh,net-scp,mime-types,multi_json,formatador,excon,builder,ruby-hmac,unicode,named-parameters,google-api-client,deface,gettext,po_to_json,activesupport,hoe,newgem,actionpack,rack,rake-compiler,bundler,railties,actionmailer,activeresource,sprockets-rails,activemodel,actionview,rake,actionwebservice,trollop,cdb-full,tokyocabinet,ffi,netrc,rdoc,sexp_processor,ParseTree,ruby2ruby,unf_ext,rspec,launchy
HTTP Success
Query List: ["RubyInline", "SexpProcessor", "erubis", "archive-tar-minitar", "rcov", "sprockets", "thor", "aruba", "RedCloth", "syntax", "rubigen", "cucumber", "retriable", "jwt", "extlib", "faraday", "autoparse", "addressable", "signet", "httpadapter", "sinatra", "liquid", "colorize", "spoon", "configuration", "rspec-mocks", "rspec-expectations", "rspec-core", "diff-lcs", "spicycode-rcov", "test-spec", "camping", "fcgi", "memcache-client", "mongrel", "ruby-openid", "thin", "text", "locale", "levenshtein", "minitest", "rubyforge", "gemcutter", "mini_portile", "racc", "tenderlove-frex", "rexical", "weakling", "highline", "github_api", "git", "thoughtbot-shoulda", "mhennemeyer-output_catcher", "rr", "mocha", "redgreen", "peterwald-git", "schacon-git", "bones", "needle", "jruby-pageant", "echoe", "rails-observers", "mail", "text-format", "i18n", "bcrypt-ruby", "tzinfo", "arel", "activerecord-deprecated_finders", "journey", "rack-test", "rack-cache", "rack-mount", "rack-ssl", "thread_safe"]
Query Gemcutter Dependency Endpoint API: RubyInline SexpProcessor erubis archive-tar-minitar rcov sprockets thor aruba RedCloth syntax rubigen cucumber retriable jwt extlib faraday autoparse addressable signet httpadapter sinatra liquid colorize spoon configuration rspec-mocks rspec-expectations rspec-core diff-lcs spicycode-rcov test-spec camping fcgi memcache-client mongrel ruby-openid thin text locale levenshtein minitest rubyforge gemcutter mini_portile racc tenderlove-frex rexical weakling highline github_api git thoughtbot-shoulda mhennemeyer-output_catcher rr mocha redgreen peterwald-git schacon-git bones needle jruby-pageant echoe rails-observers mail text-format i18n bcrypt-ruby tzinfo arel activerecord-deprecated_finders journey rack-test rack-cache rack-mount rack-ssl thread_safe
Fetching from: https://rubygems.org/api/v1/dependencies?gems=RubyInline,SexpProcessor,erubis,archive-tar-minitar,rcov,sprockets,thor,aruba,RedCloth,syntax,rubigen,cucumber,retriable,jwt,extlib,faraday,autoparse,addressable,signet,httpadapter,sinatra,liquid,colorize,spoon,configuration,rspec-mocks,rspec-expectations,rspec-core,diff-lcs,spicycode-rcov,test-spec,camping,fcgi,memcache-client,mongrel,ruby-openid,thin,text,locale,levenshtein,minitest,rubyforge,gemcutter,mini_portile,racc,tenderlove-frex,rexical,weakling,highline,github_api,git,thoughtbot-shoulda,mhennemeyer-output_catcher,rr,mocha,redgreen,peterwald-git,schacon-git,bones,needle,jruby-pageant,echoe,rails-observers,mail,text-format,i18n,bcrypt-ruby,tzinfo,arel,activerecord-deprecated_finders,journey,rack-test,rack-cache,rack-mount,rack-ssl,thread_safe
HTTP Success
Query List: ["text-hyphen", "ZenTest", "termios", "metaclass", "english", "rspec-support", "multipart-post", "tlsmail", "treetop", "daemons", "fastthread", "gem_plugin", "cgi_multipart_eof_fix", "rack-protection", "tilt", "shotgun", "backports", "multimap", "multi_test", "gherkin", "term-ansicolor", "polyglot", "json_pure", "hike", "bcrypt", "ruby-yadis", "childprocess", "background_process", "bcat", "rdiscount", "flexmock", "allison", "abstract", "markaby", "metaid", "mab", "descendants_tracker", "oauth2", "hashie", "eventmachine", "eventmachine-le", "http_parser.rb", "preforker", "loquacious", "little-plugger", "bones-git", "bones-extras", "atomic"]
Query Gemcutter Dependency Endpoint API: text-hyphen ZenTest termios metaclass english rspec-support multipart-post tlsmail treetop daemons fastthread gem_plugin cgi_multipart_eof_fix rack-protection tilt shotgun backports multimap multi_test gherkin term-ansicolor polyglot json_pure hike bcrypt ruby-yadis childprocess background_process bcat rdiscount flexmock allison abstract markaby metaid mab descendants_tracker oauth2 hashie eventmachine eventmachine-le http_parser.rb preforker loquacious little-plugger bones-git bones-extras atomic
Fetching from: https://rubygems.org/api/v1/dependencies?gems=text-hyphen,ZenTest,termios,metaclass,english,rspec-support,multipart-post,tlsmail,treetop,daemons,fastthread,gem_plugin,cgi_multipart_eof_fix,rack-protection,tilt,shotgun,backports,multimap,multi_test,gherkin,term-ansicolor,polyglot,json_pure,hike,bcrypt,ruby-yadis,childprocess,background_process,bcat,rdiscount,flexmock,allison,abstract,markaby,metaid,mab,descendants_tracker,oauth2,hashie,eventmachine,eventmachine-le,http_parser.rb,preforker,loquacious,little-plugger,bones-git,bones-extras,atomic
HTTP Success
Query List: ["tins", "spruz", "facets", "language", "escape_utils", "bones-rcov", "bones-rubyforge", "bones-rspec", "bones-zentest", "multi_xml", "httpauth", "faraday-middleware"]
Query Gemcutter Dependency Endpoint API: tins spruz facets language escape_utils bones-rcov bones-rubyforge bones-rspec bones-zentest multi_xml httpauth faraday-middleware
Fetching from: https://rubygems.org/api/v1/dependencies?gems=tins,spruz,facets,language,escape_utils,bones-rcov,bones-rubyforge,bones-rspec,bones-zentest,multi_xml,httpauth,faraday-middleware
HTTP Success
Query List: []
Unmet Dependencies: ["faraday-middleware", "spicycode-rcov", "tenderlove-frex", "mhennemeyer-output_catcher", "peterwald-git", "schacon-git"]
Fetching gem metadata from https://rubygems.org/
Query List: ["faraday-middleware", "spicycode-rcov", "tenderlove-frex", "mhennemeyer-output_catcher", "peterwald-git", "schacon-git"]
Query Gemcutter Dependency Endpoint API: faraday-middleware spicycode-rcov tenderlove-frex mhennemeyer-output_catcher peterwald-git schacon-git
Fetching from: https://rubygems.org/api/v1/dependencies?gems=faraday-middleware,spicycode-rcov,tenderlove-frex,mhennemeyer-output_catcher,peterwald-git,schacon-git
HTTP Success
Query List: []
Bundler could not find compatible versions for gem "nokogiri":
In Gemfile:
foreman_setup (= 2.0.4) ruby depends on
nokogiri (~> 1.4.3) ruby
rbvmomi (~> 1.6.0) ruby depends on
nokogiri (1.6.1)
/usr/lib/ruby/vendor_ruby/bundler/resolver.rb:129:in 'block in resolve'
/usr/lib/ruby/vendor_ruby/bundler/resolver.rb:127:in 'catch'
/usr/lib/ruby/vendor_ruby/bundler/resolver.rb:127:in 'resolve'
/usr/lib/ruby/vendor_ruby/bundler/definition.rb:192:in 'resolve'
/usr/lib/ruby/vendor_ruby/bundler/definition.rb:127:in 'specs'
/usr/lib/ruby/vendor_ruby/bundler/definition.rb:122:in 'resolve_remotely!'
/usr/lib/ruby/vendor_ruby/bundler/installer.rb:48:in 'run'
/usr/lib/ruby/vendor_ruby/bundler/installer.rb:12:in 'install'
/usr/lib/ruby/vendor_ruby/bundler/cli.rb:220:in 'install'
/usr/lib/ruby/vendor_ruby/bundler/vendor/thor/task.rb:22:in 'run'
/usr/lib/ruby/vendor_ruby/bundler/vendor/thor/invocation.rb:118:in 'invoke_task'
/usr/lib/ruby/vendor_ruby/bundler/vendor/thor.rb:263:in 'dispatch'
/usr/lib/ruby/vendor_ruby/bundler/vendor/thor/base.rb:386:in 'start'
/usr/bin/bundle:13:in '<main>'
+ [ -f /usr/share/foreman/config/database.yml ]
+ [ ! -z 1 ]
+ /usr/sbin/foreman-rake db:migrate
Could not find gem 'foreman_setup (= 2.0.4) ruby' in the gems available on this machine.
Run 'bundle install' to install missing gems.
+ true
+ chown -Rf foreman:foreman /usr/share/foreman
+ exit 0
+ db_stop
+ echo STOP
Eu não sou tão familiarizado com o rubi. Alguma idéia de como corrigir isso, para que o instalador possa concluir a instalação do contramestre?
Tags foreman