DEV Community

Kiet Nguyen
Kiet Nguyen

Posted on • Edited on

wkhtmltoimage-binary and wkhtmltopdf-binary gems for ARM

Issue

Error below might occur when you have wkhtmltoimage-binary or wkhtmltopdf-binary gems while running ARM when Gemfile

qemu-x86_64: Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory
Enter fullscreen mode Exit fullscreen mode

Workaround

# ubuntu:20.04
export PLATFORM=$(dpkg --print-architecture)\
  && apt-get update\
  && apt-get install -y libfontenc1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils\
  && wget --quiet https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_${PLATFORM}.deb\
  && dpkg -i wkhtmltox_0.12.6-1.focal_${PLATFORM}.deb\
  && rm wkhtmltox_0.12.6-1.focal_${PLATFORM}.deb
  && rm -rf /var/lib/apt/lists/*\
  && apt-get purge --auto-remove\
  && apt-get clean
Enter fullscreen mode Exit fullscreen mode

Top comments (1)

Collapse
 
hbenzaoui profile image
Hamza Benzaoui

Thanks