zakird / wkhtmltopdf_binary_gem

Ruby gem containing easily installable access to wkhtmltopdf application
https://rubygems.org/gems/wkhtmltopdf-binary
Apache License 2.0
182 stars 347 forks source link

Missing binary for archlinux/manjaro #71

Closed palytoxin closed 4 years ago

palytoxin commented 4 years ago

Missing binary forarchlinux/manjaro

Invalid platform, must be running on Ubuntu 14.04/16.04/18.04 CentOS 6/7/8, Debian 8/9/10, or intel-based macOS (missing binary: /home/yan/code/.asdf/installs/ruby/2.6.5/lib/ruby/gems/2.6.0/gems/wkhtmltopdf-binary-0.12.5.4/bin/wkhtmltopdf_manjaro__amd64

What do I need to make it work?

unixmonkey commented 4 years ago

I'm not very familiar with that version, but from a web search of "wkhtmltopdf manjaro", it seems like there's a standard package you can install with sudo pacman -S wkhtmltopdf, and this page makes it look like it was built using the debian bionic package, which I think means that the wkhtmltopdf_debian_10_amd64 binary in this project should also work.

If it does, you could send us a PR with a change similar to this one to use the binary that works with your system.

Let me know how it goes.

palytoxin commented 4 years ago

I was cp wkhtmltopdf_debian_10_amd64.gz to wkhtmltopdf_manjaro__amd64.gz.

/home/yan/code/.asdf/installs/ruby/2.6.5/lib/ruby/gems/2.6.0/gems/wkhtmltopdf-binary-0.12.5.4 \
/bin/wkhtmltopdf_manjaro__amd64: \
error while loading shared libraries: libjpeg.so.62: cannot open shared object file: No such file or directory

It's seem the lib versions don't match

home> ll /usr/lib/libjpeg.so*                                                                                                                                                                                                      
lrwxrwxrwx 1 root root   12 Jan  2 04:38 /usr/lib/libjpeg.so -> libjpeg.so.8*
lrwxrwxrwx 1 root root   16 Jan  2 04:38 /usr/lib/libjpeg.so.8 -> libjpeg.so.8.2.2*
-rwxr-xr-x 1 root root 598K Jan  2 04:38 /usr/lib/libjpeg.so.8.2.2*

then, I ln -s libjpeg.so.8.2.2 to libjpeg.so.62. got

/home/yan/code/.asdf/installs/ruby/2.6.5/lib/ruby/gems/2.6.0/gems/wkhtmltopdf-binary-0.12.5.4 \
/bin/wkhtmltopdf_manjaro__amd64: \
 /usr/lib/libjpeg.so.62: version `LIBJPEG_6.2' not found \
 (required by /home/yan/code/.asdf/installs/ruby/2.6.5/lib/ruby/gems/2.6.0/gems/wkhtmltopdf-binary-0.12.5.4/bin/wkhtmltopdf_manjaro__amd64

Now, I don't know what should I do.

My OS:

home> cat /etc/issue                                                                                                                                                                                                               
Manjaro Linux \r  (\n) (\l)

home> cat /etc/manjaro-release                                                                                                                                                                                                     
Manjaro Linux
palytoxin commented 4 years ago

I also submitted an issue to the upstream https://github.com/wkhtmltopdf/packaging/issues/60

But I don't have qt's or C like code experience, so I am learning how to proceed

unixmonkey commented 4 years ago

Have you tried to install with your package manager? Those things are usually pretty good about getting dependent libraries also installed.

palytoxin commented 4 years ago

oh, Last time I install wkhtmltopdf with official.

but now, I install https://aur.archlinux.org/packages/wkhtmltopdf-static/, still the same error

RandieM commented 4 years ago

In case it helps anyone, I had the same problem on Fedora 31. I copied the file wkhtmltopdf_centos_8_amd64.gz and renamed it to wkhtmltopdf_fedora_31_amd64.gz and it did the trick for me.

The relevant error here: Invalid platform, must be running on Ubuntu 14.04/16.04/18.04 CentOS 6/7/8, Debian 8/9/10, or intel-based macOS (missing binary: ~/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/wkhtmltopdf-binary-0.12.5.4/bin/wkhtmltopdf_fedora_31_amd64). (RuntimeError)

dockerlead commented 4 years ago

Any update for Manjaro/Arch?

palytoxin commented 4 years ago

@dockerlead I submitted a pr to upstream and it looks like the compiled package is working fine