无法在heroku上安装hiredis

时间:2015-02-16 07:12:23

标签: ruby-on-rails heroku hiredis

我无法在heroku上安装hiredis,尽管我使用自定义构建包预先安装hiredis(https://github.com/keiko713/heroku-buildpack-hiredis)。我该如何解决这个问题?

当我执行git push时,这是我的日志的一部分:

       Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/ruby-2.1.5/bin/ruby extconf.rb
   cc -std=c99 -pedantic -c -O3 -fPIC  -Wall -W -Wstrict-prototypes -Wwrite-strings true  net.c
   cc: error: true: No such file or directory
   make: *** [net.o] Error 1
   *** 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
   --without-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=/tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/ruby-2.1.5/bin/ruby
   extconf.rb:25:in `block in <main>': Building hiredis failed (RuntimeError)
   from extconf.rb:23:in `chdir'
   from extconf.rb:23:in `<main>'

   extconf failed, exit code 1

   Gem files will remain installed in /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/hiredis-0.5.2 for inspection.
   Results logged to /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/extensions/x86_64-linux/2.1.0-static/hiredis-0.5.2/gem_make.out
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/ruby-2.1.5/lib/ruby/2.1.0/rubygems/ext/builder.rb:89:in `run'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/ruby-2.1.5/lib/ruby/2.1.0/rubygems/ext/ext_conf_builder.rb:38:in `block in build'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/ruby-2.1.5/lib/ruby/2.1.0/tempfile.rb:324:in `open'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/ruby-2.1.5/lib/ruby/2.1.0/rubygems/ext/ext_conf_builder.rb:17:in `build'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/ruby-2.1.5/lib/ruby/2.1.0/rubygems/ext/builder.rb:161:in `block (2 levels) in build_extension'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/ruby-2.1.5/lib/ruby/2.1.0/rubygems/ext/builder.rb:160:in `chdir'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/ruby-2.1.5/lib/ruby/2.1.0/rubygems/ext/builder.rb:160:in `block in build_extension'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/ruby-2.1.5/lib/ruby/2.1.0/rubygems/ext/builder.rb:159:in `synchronize'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/ruby-2.1.5/lib/ruby/2.1.0/rubygems/ext/builder.rb:159:in `build_extension'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/ruby-2.1.5/lib/ruby/2.1.0/rubygems/ext/builder.rb:198:in `block in build_extensions'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/ruby-2.1.5/lib/ruby/2.1.0/rubygems/ext/builder.rb:195:in `each'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/ruby-2.1.5/lib/ruby/2.1.0/rubygems/ext/builder.rb:195:in `build_extensions'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/ruby-2.1.5/lib/ruby/2.1.0/rubygems/installer.rb:677:in `build_extensions'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/ruby-2.1.5/lib/ruby/2.1.0/rubygems/installer.rb:232:in `install'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/source/rubygems.rb:112:in `block in install'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/rubygems_integration.rb:130:in `preserve_paths'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/source/rubygems.rb:105:in `install'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/installer.rb:104:in `block in install_gem_from_spec'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/rubygems_integration.rb:162:in `with_build_args'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/installer.rb:103:in `install_gem_from_spec'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/installer.rb:282:in `block in install_in_parallel'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/parallel_workers/unix_worker.rb:42:in `call'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/parallel_workers/unix_worker.rb:42:in `block (2 levels) in prepare_workers'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/parallel_workers/unix_worker.rb:35:in `fork'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/parallel_workers/unix_worker.rb:35:in `block in prepare_workers'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/parallel_workers/unix_worker.rb:31:in `times'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/parallel_workers/unix_worker.rb:31:in `each'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/parallel_workers/unix_worker.rb:31:in `map'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/parallel_workers/unix_worker.rb:31:in `prepare_workers'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/parallel_workers/worker.rb:20:in `initialize'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/parallel_workers/unix_worker.rb:20:in `initialize'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/parallel_workers.rb:14:in `new'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/parallel_workers.rb:14:in `worker_pool'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/installer.rb:280:in `install_in_parallel'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/installer.rb:88:in `run'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/installer.rb:18:in `install'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/cli/install.rb:79:in `run'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/cli.rb:145:in `install'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/vendor/thor/command.rb:27:in `run'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/vendor/thor/invocation.rb:121:in `invoke_command'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/vendor/thor.rb:363:in `dispatch'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/vendor/thor/base.rb:440:in `start'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/cli.rb:9:in `start'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/bin/bundle:20:in `block in <top (required)>'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/friendly_errors.rb:5:in `with_friendly_errors'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/bin/bundle:18:in `<top (required)>'
   vendor/bundle/ruby/2.1.0/bin/bundle:19:in `load'
   vendor/bundle/ruby/2.1.0/bin/bundle:19:in `<main>'
   Installing multi_json 1.10.1
   2:  multi_json (1.10.1) from /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/specifications/multi_json-1.10.1.gemspec
   Installing msgpack 0.5.8
   0:  msgpack (0.5.8) from /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/specifications/msgpack-0.5.8.gemspec
   An error occurred while installing hiredis (0.5.2), and Bundler cannot continue.
   Make sure that `gem install hiredis -v '0.5.2'` succeeds before bundling.
   Bundler::InstallError: An error occurred while installing hiredis (0.5.2), and Bundler cannot continue.
   Make sure that `gem install hiredis -v '0.5.2'` succeeds before bundling.
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/installer.rb:139:in `rescue in install_gem_from_spec'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/installer.rb:99:in `install_gem_from_spec'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/installer.rb:282:in `block in install_in_parallel'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/parallel_workers/unix_worker.rb:42:in `call'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/parallel_workers/unix_worker.rb:42:in `block (2 levels) in prepare_workers'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/parallel_workers/unix_worker.rb:35:in `fork'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/parallel_workers/unix_worker.rb:35:in `block in prepare_workers'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/parallel_workers/unix_worker.rb:31:in `times'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/parallel_workers/unix_worker.rb:31:in `each'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/parallel_workers/unix_worker.rb:31:in `map'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/parallel_workers/unix_worker.rb:31:in `prepare_workers'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/parallel_workers/worker.rb:20:in `initialize'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/parallel_workers/unix_worker.rb:20:in `initialize'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/parallel_workers.rb:14:in `new'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/parallel_workers.rb:14:in `worker_pool'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/installer.rb:280:in `install_in_parallel'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/installer.rb:88:in `run'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/installer.rb:18:in `install'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/cli/install.rb:79:in `run'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/cli.rb:145:in `install'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/vendor/thor/command.rb:27:in `run'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/vendor/thor/invocation.rb:121:in `invoke_command'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/vendor/thor.rb:363:in `dispatch'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/vendor/thor/base.rb:440:in `start'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/cli.rb:9:in `start'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/bin/bundle:20:in `block in <top (required)>'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/lib/bundler/friendly_errors.rb:5:in `with_friendly_errors'
   /tmp/build_0abffd570b6a7e2e235d97d5906bfb5c/vendor/bundle/ruby/2.1.0/gems/bundler-1.7.12/bin/bundle:18:in `<top (required)>'
   vendor/bundle/ruby/2.1.0/bin/bundle:19:in `load'
   vendor/bundle/ruby/2.1.0/bin/bundle:19:in `<main>'

<!/ P>

1 个答案:

答案 0 :(得分:0)

我有同样的问题。我在make文件中找到了hiredis存在的行 DEBUG?= -g -ggdb REAL_CFLAGS = $(OPTIMIZATION)-fPIC $(CFLAGS)$(警告)$(DEBUG)$(ARCH)

在我的env变量中,

将DEBUG设置为true。并且编译是在破坏的平面上执行的。