wkhtmltopdf_binary_gem
wkhtmltopdf_binary_gem copied to clipboard
Missing libpng12 in AmazonLinux2023
An error occured on AmazonLinux2023:
RuntimeError PDF could not be generated!
Command Error: /var/www/app/shared/bundle/ruby/3.0.0/gems/wkhtmltopdf-binary-0.12.6.6/bin/wkhtmltopdf_centos_6_amd64: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory
- ruby version: 3.0.0
- library version:
wkhtmltopdf-binary-0.12.6.6
This is my cat /etc/os-release :
NAME="Amazon Linux"
VERSION="2023"
ID="amzn"
ID_LIKE="fedora"
VERSION_ID="2023"
PLATFORM_ID="platform:al2023"
PRETTY_NAME="Amazon Linux 2023"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2023"
HOME_URL="https://aws.amazon.com/linux/"
BUG_REPORT_URL="https://github.com/amazonlinux/amazon-linux-2023"
SUPPORT_END="2028-03-01"
I think bin/wkhtmltopdf should concern os is amzn_2023 at here:
os = 'centos_6' if (os.start_with?('amzn_') && os != 'amzn_2') ||
(os.empty? && File.read('/etc/centos-release').start_with?('CentOS release 6'))
os = 'centos_7' if (os.start_with?('amzn_2') && !os.start_with?('amzn_20')) ||
os.start_with?('rhel_7.')
Can confirm this issue. I've tried hacking around it to make it use the centos 7 & 8 binaries, but the issue goes further than just the libpng version being used. Also ran into issues with libssl and libcrypto, which are both looking for versions 1.1 and the system has version 3.0.8 installed.
I see this issue is marked as "completed on Apr 3". I'm still facing this issue. Any updates on it?