2012-04-03 8 views
1

sudo gem install perftools.rb -p http://10.10.10.10:3128 ...Installation perftools.rb über Proxy

/usr/local/lib/ruby/1.9.1/net/http.rb:762:in „initialisieren „: Connection refused - Verbindung (2) (Errno :: ECONNREFUSED)

...

anfordern http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p0.tar.gz

Voll Nachricht:

sudo gem install perftools.rb -p http://10.249.134.143:3128 
Building native extensions. This could take a while... 
ERROR: Error installing perftools.rb: 
ERROR: Failed to build gem native extension. 

/usr/local/bin/ruby extconf.rb 
(I'm about to compile google-perftools.. this will definitely take a while) 
-- tar zpxvf gperftools-2.0.tar.gz 
-- patch -p1 < ../../../patches/perftools.patch 
-- patch -p1 < ../../../patches/perftools-notests.patch 
-- patch -p1 < ../../../patches/perftools-pprof.patch 
-- patch -p1 < ../../../patches/perftools-gc.patch 
-- patch -p1 < ../../../patches/perftools-debug.patch 
-- patch -p1 < ../../../patches/perftools-objects.patch 
-- patch -p1 < ../../../patches/perftools-frames.patch 
-- patch -p1 < ../../../patches/perftools-realtime.patch 
-- sed -i -e 's,SpinLock,ISpinLock,g' src/*.cc src/*.h src/base/*.cc src/base/*.h 
-- ./configure --disable-heap-profiler --disable-heap-checker --disable-debugalloc --  disable-shared 
-- make 
checking for method.h... no 
checking for vm_core.h... no 
/usr/local/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:39:  Use RbConfig instead of obsolete and deprecated Config. 
checking for method.h... no 
checking for vm_core.h... no 
*** extconf.rb failed *** 
Could not create Makefile due to some reason, probably lack of 
necessary libraries and/or headers. Check the mkmf.log file for more 
details. You may need configuration options. 

Provided configuration options: 
--with-opt-dir 
--with-opt-include 
--without-opt-include=${opt-dir}/include 
--with-opt-lib 
--without-opt-lib=${opt-dir}/lib 
--with-make-prog 
--without-make-prog 
--srcdir=. 
--curdir 
--ruby=/usr/local/bin/ruby 
/usr/local/lib/ruby/1.9.1/net/http.rb:762:in `initialize': Connection refused -  connect(2) (Errno::ECONNREFUSED) 
from /usr/local/lib/ruby/1.9.1/net/http.rb:762:in `open' 
from /usr/local/lib/ruby/1.9.1/net/http.rb:762:in `block in connect' 
from /usr/local/lib/ruby/1.9.1/timeout.rb:54:in `timeout' 
from /usr/local/lib/ruby/1.9.1/timeout.rb:99:in `timeout' 
from /usr/local/lib/ruby/1.9.1/net/http.rb:762:in `connect' 
from /usr/local/lib/ruby/1.9.1/net/http.rb:755:in `do_start' 
from /usr/local/lib/ruby/1.9.1/net/http.rb:744:in `start' 
from /usr/local/lib/ruby/1.9.1/net/http.rb:1284:in `request' 
from /usr/local/lib/ruby/gems/1.9.1/gems/ruby_core_source- 0.1.5/lib/contrib/uri_ext.rb:239:in `block in read' 
from /usr/local/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:286:in `connect' 
from /usr/local/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:234:in `read' 
from /usr/local/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:128:in `download' 
from /usr/local/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:55:in `block in create_makefile_with_core' 
from /usr/local/lib/ruby/1.9.1/tempfile.rb:316:in `open' 
from /usr/local/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:51:in `create_makefile_with_core' 
from extconf.rb:104:in `<main>' 
Requesting http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p0.tar.gz 


Gem files will remain installed in /usr/local/lib/ruby/gems/1.9.1/gems/perftools.rb-2.0.0 for inspection. 
Results logged to /usr/local/lib/ruby/gems/1.9.1/gems/perftools.rb-2.0.0/ext/gem_make.out 

Es scheint, als ob die Kompilation aus Quellen Ruby-Quellen benötigt und versucht, sie direkt von der Ruby-Seite herunterzuladen. Wie installiere ich perftools.rb via http-Proxy?

+0

Dank für den Versuch, die Frage besser lesbar zu machen, aber Können Sie den vollständigen Nachrichtensatz sowie die aktuelle Zusammenfassung posten? –

+0

Andrew, vollständige Nachricht hinzugefügt – shevchyk

Antwort

0

Es stellte sich heraus, dass ruby_core_source gem nicht richtig http_proxy Variable auf meiner Ubuntu-Box gelesen. Ich habe tar.gz-Datei von Ruby-Website heruntergeladen und ein wenig 1.9.1/Edelstein ändern/ruby_core_source-0.1.5/lib/ruby_core_source.rb:

53: temp.binmode 
54: uri = URI.parse(uri_path) 
55: #uri.download(temp) 
57: 
58: tgz = Zlib::GzipReader.new(File.open("/home/dir/ruby-1.9.3-p125.tar.gz",  "rb")) 
59: 
60: FileUtils.mkdir_p(dest_dir) 
61: Dir.mktmpdir { |dir| 
62: inc_dir = dir + "/" + ruby_dir + "/*.inc" 
63: hdr_dir = dir + "/" + ruby_dir + "/*.h" 
64: Archive::Tar::Minitar.unpack(tgz, dir) 
65: FileUtils.cp(Dir.glob([ inc_dir, hdr_dir ]), dest_dir) 
66: } 
67:}