passenger meet Library not loaded error : liblzma.5.dylib

邮差的信 提交于 2019-12-13 13:55:41

问题


I am trying to running rails with passenger.

I both AWS SDK 1 and 2 gem installed:

gem 'aws-sdk-v1'
gem 'aws-sdk', '~> 2'

when I use AWS sdk to run:

s3 = AWS::S3.new

I meet error:

LoadError: dlopen(/Users/XXXX/.rbenv/versions/1.9.3-p551/lib/ruby/gems/1.9.1/gems/nokogiri-1.6.6.2/lib/nokogiri/nokogiri.bundle, 9): 
Library not loaded: /usr/local/lib/liblzma.5.dylib
Referenced from: /Users/XXXX/.rbenv/versions/1.9.3-p551/lib/ruby/gems/1.9.1/gems/nokogiri-1.6.6.2/lib/nokogiri/nokogiri.bundle
Reason: Incompatible library version: nokogiri.bundle requires version 8.0.0 or later, but liblzma.5.dylib provides version 6.0.0

otool -L shows me that the version is 8.1.0

$ otool -L /usr/local/lib/liblzma.5.dylib
/usr/local/lib/liblzma.5.dylib:
/usr/local/lib/liblzma.5.dylib (compatibility version 8.0.0, current version 8.1.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)

It is strange that this error not shows up when I run 'rails s'. update / uninstall / reinstall xz by brew not helps. update / uninstall / reinstall gem nokogiri also not helps.


回答1:


Try to follow this https://github.com/PromyLOPh/pianobar/issues/530#issuecomment-125746641

This is the fix: Cannot get ffmpeg to work after installing from homebrew

Using brew: brew install xz because liblzma is inside xz now




回答2:


That is not a problem in Passenger, it is a problem in one of your gems. Apparently you installed Nokogiri some time in the past, and back then it was linked to liblzma 5, but some time later you upgraded liblzma to the incompatible version 6. Try uninstalling that gem, then installing it again.




回答3:


updating gems worked for me

bundle update


来源:https://stackoverflow.com/questions/32293619/passenger-meet-library-not-loaded-error-liblzma-5-dylib

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!