Skip to content

Missing libpng12 in AmazonLinux2023 #161

Description

@pxp-baba

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.')

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions