Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run pdd: Error loading shared library liblzma.so.5 #191

Open
g4s8 opened this issue Jan 21, 2022 · 8 comments
Open

Can't run pdd: Error loading shared library liblzma.so.5 #191

g4s8 opened this issue Jan 21, 2022 · 8 comments

Comments

@g4s8
Copy link

g4s8 commented Jan 21, 2022

I'm trying to run pdd CLI tool from Docker after updating base image from alpine:3.10 to alpine:3.13 - on 3.10 image, it's working fine until gem fails to install pdd with warning that Ruby version is old and has some security bugs. On a new image ruby version is 2.7.0 and pdd can be installed successfully. But now it's failing in runtime on pdd call with strange error (see stack trace below). It looks like pdd uses some native platform dependent-shared objects. I don't really know why Ruby uses binary objects, and how can I fix it on my side.

/usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in `require': Error loading shared library liblzma.so.5: No such file or directory (needed by /usr/lib/ruby/gems/2.7.0/gems/nokogiri-1.13.1/lib/nokogiri/nokogiri.so) - /usr/lib/ruby/gems/2.7.0/gems/nokogiri-1.13.1/lib/nokogiri/nokogiri.so (LoadError)
	from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in `require'
	from /usr/lib/ruby/gems/2.7.0/gems/nokogiri-1.13.1/lib/nokogiri/extension.rb:30:in `rescue in <top (required)>'
	from /usr/lib/ruby/gems/2.7.0/gems/nokogiri-1.13.1/lib/nokogiri/extension.rb:4:in `<top (required)>'
	from /usr/lib/ruby/gems/2.7.0/gems/nokogiri-1.13.1/lib/nokogiri.rb:10:in `require_relative'
	from /usr/lib/ruby/gems/2.7.0/gems/nokogiri-1.13.1/lib/nokogiri.rb:10:in `<top (required)>'
	from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in `require'
	from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in `require'
	from /usr/lib/ruby/gems/2.7.0/gems/pdd-0.20.8/bin/pdd:28:in `<top (required)>'
	from /usr/bin/pdd:23:in `load'
	from /usr/bin/pdd:23:in `<main>'
/usr/lib/ruby/gems/2.7.0/gems/nokogiri-1.13.1/lib/nokogiri/extension.rb:7:in `require_relative': cannot load such file -- /usr/lib/ruby/gems/2.7.0/gems/nokogiri-1.13.1/lib/nokogiri/2.7/nokogiri (LoadError)
	from /usr/lib/ruby/gems/2.7.0/gems/nokogiri-1.13.1/lib/nokogiri/extension.rb:7:in `<top (required)>'
	from /usr/lib/ruby/gems/2.7.0/gems/nokogiri-1.13.1/lib/nokogiri.rb:10:in `require_relative'
	from /usr/lib/ruby/gems/2.7.0/gems/nokogiri-1.13.1/lib/nokogiri.rb:10:in `<top (required)>'
	from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in `require'
	from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in `require'
	from /usr/lib/ruby/gems/2.7.0/gems/pdd-0.20.8/bin/pdd:28:in `<top (required)>'
	from /usr/bin/pdd:23:in `load'
	from /usr/bin/pdd:23:in `<main>'

Full log: https://github.com/artipie/artipie/runs/4892946070?check_suite_focus=true

Docker image: https://github.com/artipie/artipie/runs/4892946070?check_suite_focus=true

@yegor256
Copy link
Member

@mbao01 can you please take a look?

@mbao01
Copy link
Contributor

mbao01 commented Feb 6, 2022

@g4s8 Hi, I could not reproduce this issue using macOS, docker v20.10.6, alpine:3.13 and ruby v2.7.0. Please let me know if you still face this issue and if possible provide additional info. Here are the steps I used on macOS.

Pre-installation steps

docker run -it alpine:3.13 /bin/sh
/# apk update
/# apk add --no-cache build-base
/# apk add ruby ruby-dev
/# gem install json
/# gem install pdd

Run pdd

@g4s8
Copy link
Author

g4s8 commented Feb 7, 2022

@mbao01 @yegor256 this issue was fixed by @baudoliver7 in this PR: maxonfjvipon/pdd-action#4

I think it would be good to point in readme what runtime dependencies pdd require (maybe without specifying distro, just say which shared lib should be installed).

@mbao01
Copy link
Contributor

mbao01 commented Feb 7, 2022

@g4s8 Super! We will add these dependencies to the readme. Thank you.

@mbao01
Copy link
Contributor

mbao01 commented Feb 11, 2022

@g4s8 please can you close this issue?

@g4s8
Copy link
Author

g4s8 commented Feb 13, 2022

@g4s8 please can you close this issue?

@mbao01 I think issue is not really solved: new users may have the same problem. Can you please add installation details to the readme file?

@yegor256
Copy link
Member

@mbao01 ping

@mbao01
Copy link
Contributor

mbao01 commented Mar 29, 2022

@g4s8 I will take a second look at this. Thank you)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants