Since an auto-update several days ago I found that I can no longer use pdfbeads utility. It creates a PDF from a series of TIFF images, and uses ImageMagick for image processing.
I started digging and found that pdfbeads calls ImageMagick via rmagick ruby gem. During initialization, it checks the file formats which it supports, and fails during ImageMagick import problem. Here’s the essential part of the failing code reproduced via interactive shell:
$ irb
> require 'rmagick'
> Magick.formats
/home/krvkir/.local/share/gem/ruby/3.2.0/gems/rmagick-6.0.1/lib/rmagick_internal.rb:52:in `init_formats': unable to load module '/usr/lib/ImageMagick-7.1.1/modules-Q16HDRI/coders/uhdr.la': file not found @ error/module.c/OpenModule/1293 (Magick::ImageMagickError)
from /home/krvkir/.local/share/gem/ruby/3.2.0/gems/rmagick-6.0.1/lib/rmagick_internal.rb:52:in `formats'
from (irb):5:in `<main>'
from /usr/lib/ruby/gems/3.2.0/gems/irb-1.6.2/exe/irb:11:in `<top (required)>'
from /usr/bin/irb:25:in `load'
from /usr/bin/irb:25:in `<main>'
Surprisingly, ImageMagick by itself, when called e.g. as display shell command, works fine and doesn’t crash.
I tried to reinstall ImageMagick but nothing changed.
I run Manjaro XFCE with the latest LTS kernel, with auto-updates enabled, if that matters. ImageMagick version is 7.1.1.38:
$ yay -Qs imagemagick
local/imagemagick 7.1.1.38-2
An image viewing/manipulation program
Do you have an idea why it broke and how to fix it?
irb is just an interactive ruby shell. I guess I installed if with gem install. (I’m a newbie in Ruby world.)
As for Ruby versions, seems that I have the latest one available in Manjaro repos:
$ ruby --version
ruby 3.2.5 (2024-07-26 revision 31d0f1a2e7) [x86_64-linux]
$ yay -Ss ruby
...
extra/ruby 3.2.5-2 (4.0 MiB 16.2 MiB) (Installed)
An object-oriented language for quick and easy programming
I guess Ruby doesn’t distinguish gems for sub-minor versions (or what’s the correct term for the number after second dot), so there’s only 3.2.0 folder in .local/share/gem.
I used pdfbeads because it reproduces djvu-like compression algorithm by pdf means, but if img2pdf does the same thing, my problem is solved (and since it supports PDF2000, there’s hope). Thanks for the link!
So the GitHub page I linked to may have been the old site for pdfbeads. The RubyGems page shows the pdfbeads home page as http://pdfbeads.rubyforge.org/, however I cannot access that page - it just times out.
Hi guys,
I am the pdfbeads developer and I’ve just run into the same problem. So many thanks for the solution provided.
By the way it was in 2021 when I updated pdfbeads the last time. For me it is still a must have tool, so I am happy somebody else uses it
Hi @anagnost thanks for your post! However, since the OP hasn’t been seen since the thread was last active, it is better that it is closed. If the OP @krvkir returns they can ask for it to be reopened if needed, by messaging @moderators.