Heroku Zbar在您的系统上找不到libzbar(LoadError) [英] Heroku Zbar Didn't find libzbar on your system (LoadError)

查看:159
本文介绍了Heroku Zbar在您的系统上找不到libzbar(LoadError)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用zbar进行条形码识别的rails应用程序。它在我的开发人员机器上工作正常,但是当我尝试将其部署到Heroku时,我的提交被拒绝,并显示以下消息:

  app / web.1:/app/vendor/bundle/ruby/2.0.0/gems/zbar-0.2.2/lib/zbar/lib.rb:12:in`rescue in< module:ZBar>':Didn在你的系统上找不到libzbar(LoadError)
app / web.1:请安装zbar(http://zbar.sourceforge.net/)或设置ZBAR_LIB,如果它位于一个奇怪的地方
app / web.1:FFI :: Library :: ffi_lib()失败,错误:库名称列表不能为空
app / web.1:from /app/vendor/bundle/ruby/2.0.0/gems/ zbar-0.2.2 / lib / zbar / lib.rb:9:在< module:ZBar>'
app / web.1:from /app/vendor/bundle/ruby/2.0.0/gems /zbar-0.2.2/lib/zbar/lib.rb:1:in`< top(required)>'
app / web.1:from /app/vendor/bundle/ruby/2.0。 0 / gems / zbar-0.2.2 / lib / zbar.rb:3:在'require'
app / web.1:from /app/vendor/bundle/ruby/2.0.0/gems/zbar- 0.2.2 / lib / zbar.rb:3:在< top(required)>'
app / web.1:from / app /vendor/bundle/ruby/2.0.0/gems/bundler-1.6.3/lib/bundler/runtime.rb:76:in`require'
app / web.1:from / app / vendor / bundle /ruby/2.0.0/gems/bundler-1.6.3/lib/bundler/runtime.rb:76:in`block(2 levels)in require'
$ b $ p这是我的gemfile;

pre $ gem'zbar','〜 > 0.2.2'

我的 /。buildpacks

  https://github.com/ballantyne/heroku-buildpack-zbar 
https:// github。 com / heroku / heroku-buildpack-ruby.git

为什么会发生这种情况?如何解决它?

解决方案

请在您的控制台中尝试:

heroku config:set ZBAR_LIB = / app / vendor / lib / libzbar.so



来源: https://github.com/willglynn/ruby-zbar/issues/8


I have a rails application which uses zbar for barcode recognition. It works fine on my developer machine, but when i tried to deploy it to Heroku my commit was rejected with the following message:

app/web.1:  /app/vendor/bundle/ruby/2.0.0/gems/zbar-0.2.2/lib/zbar/lib.rb:12:in `rescue in <module:ZBar>': Didn't find libzbar on your system (LoadError) 
app/web.1:  Please install zbar (http://zbar.sourceforge.net/) or set ZBAR_LIB if it's in a weird place 
app/web.1:  FFI::Library::ffi_lib() failed with error: library names list must not be empty 
app/web.1:  from /app/vendor/bundle/ruby/2.0.0/gems/zbar-0.2.2/lib/zbar/lib.rb:9:in `<module:ZBar>' 
app/web.1:  from /app/vendor/bundle/ruby/2.0.0/gems/zbar-0.2.2/lib/zbar/lib.rb:1:in `<top (required)>' 
app/web.1:  from /app/vendor/bundle/ruby/2.0.0/gems/zbar-0.2.2/lib/zbar.rb:3:in `require' 
app/web.1:  from /app/vendor/bundle/ruby/2.0.0/gems/zbar-0.2.2/lib/zbar.rb:3:in `<top (required)>' 
app/web.1:  from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.6.3/lib/bundler/runtime.rb:76:in `require' 
app/web.1:  from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.6.3/lib/bundler/runtime.rb:76:in `block (2 levels) in require' 

Here is my gemfile;

gem 'zbar', '~> 0.2.2'

my /.buildpacks:

https://github.com/ballantyne/heroku-buildpack-zbar
https://github.com/heroku/heroku-buildpack-ruby.git

Why does this happen? How to get around it?

解决方案

please try in your console:

heroku config:set ZBAR_LIB=/app/vendor/lib/libzbar.so

source: https://github.com/willglynn/ruby-zbar/issues/8

这篇关于Heroku Zbar在您的系统上找不到libzbar(LoadError)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆