Forum Bugs

10r7 CentOS dependencies / Amazon AMI

skradel
10r7 seems to add some new dependencies not present in 10r4, evidenced by the refusal of amzn-ami-hvm-2015.03.1.x86_64-gp2 (ami-0d4cfd66) to find libpng15 (see below).

Do you suggest a different PrinceXML package for this "CentOS-like" distribution?

--> Running transaction check
---> Package prince.x86_64 0:10r4-1 will be updated
---> Package prince.x86_64 0:10r7-1 will be an update
--> Processing Dependency: libpng15.so.15(PNG15_0)(64bit) for package: prince-10r7-1.x86_64
--> Processing Dependency: libpng15.so.15()(64bit) for package: prince-10r7-1.x86_64
--> Finished Dependency Resolution
Error: Package: prince-10r7-1.x86_64 (/prince-10r7-1.centos7.x86_64)
Requires: libpng15.so.15()(64bit)
Error: Package: prince-10r7-1.x86_64 (/prince-10r7-1.centos7.x86_64)
Requires: libpng15.so.15(PNG15_0)(64bit)
mikeday
We will investigate this issue. It seems that libpng-1.5 is the standard version on CentOS 7, with a libpng12 package provided for backwards compatibility. We switched to 1.5 from Prince 10r5 onwards.
andreizet
We've got this issue, too. Centos 7.
mikeday
Can you install the libpng-1.5 package on CentOS 7?
andreizet
Yes, I've tried.
Here are the steps to reproduce this:

1. Installed Prince 10r7 in: /usr/local/lib/prince

2. In terminal I've called "prince --version", and the following error occured:
"/usr/local/lib/prince//lib/prince/bin/prince: error while loading shared libraries: libpng15.so.15: cannot open shared object file: No such file or directory"

3. Got the latest libpng15 rpm for CentOS 7 from here: http://rpmfind.net/linux/rpm2html/search.php?query=libpng

4. Installed it. Called again "prince --version" and got the same issue;

5. Libpng in located in: /usr/local/libpng/lib/libpng15.so.15, so I've made a link in /usr/lib/libpng15.so.15 and nothing changed, the same error occured.

6. Tried to make a link in PRINCE installation folder but nothing changed.

It seems like PRINCE is searching for libpng15.so in a custom path.

Thanks!
spjonez
This is my ebextension script to install Prince on 64bit Amazon Linux 2015.09 v2.0.8 running PHP 5.6. I'm using the CentOS 6 rpm hosted in one of our buckets.

packages:
  yum:
    compat-libtiff3: []

files:
  /home/ec2-user/prince-10r7-1.centos6.x86_64.rpm:
    mode: '000644'
    owner: root
    group: root
    source: https://s3.amazonaws.com/bucketname/prince-10r7-1.centos6.x86_64.rpm
  /home/ec2-user/license.dat:
    mode: '000644'
    owner: root
    group: root
    encoding: plain
    content: |
      <license>
      ...
      </license>

commands:
  01_prince_install:
    cwd: /home/ec2-user
    test: '[ ! -f /usr/lib/prince/bin/prince ]'
    command: 'sudo rpm -ivh prince-10r7-1.centos6.x86_64.rpm'
  02_prince_license:
    cwd: /home/ec2-user
    command: 'sudo mv -f license.dat /usr/lib/prince/license/license.dat'
  03_prince_cleanup:
      cwd: /home/ec2-user
      test: '[ -f /home/ec2-user/prince-10r7-1.centos6.x86_64.rpm ]'
      command: 'sudo rm -f prince-10r7-1.centos6.x86_64.rpm'

Edited by spjonez

mikeday
andreizet, I'm surprised that libpng-1.5 is located in /usr/local after you install the RPM. Was it necessary to use rpmfind, does "yum install libpng" not install the correct version?

Also, did you install Prince from the CentOS 7 RPM package?
andreizet
Hey,

Ok. It seems like my ami was the problem. I've created a new ec2 with CentOS 7 from scratch using this AMI: https://aws.amazon.com/marketplace/pp/B00O7WM7QW and everything works fine now.
andreizet
Related to skradel post, please note that AMAZON AMIs are based on CentOS6.

I've created an instance from amzn-ami-hvm-2015.03.1.x86_64-gp2 (ami-0d4cfd66), installed prince-10r7-1.centos6.x86_64.rpm.

Note that you have to install libtiff and libpng.

Use "yum install libpng".
As for "libtiff", instead of installing it using yum, get it from here: https://rpmfind.net/linux/RPM/centos/6.7/x86_64/Packages/libtiff-3.9.4-10.el6_5.x86_64.html.
I don't know why, but yum's version of libtiff, 4.0 will not work with Prince so I've used 3.9 instead.

Now everythin works fine!

Hope this helps.
Thanks !
hzheng
Ran into this issue recently on AWS Beanstalk. Thanks to andreizet's comment, I was able to fix the issue. Just want to give an update to the forum.

As of April 2018, for AWS Beanstalk, pick Prince rpm for CentOS 6 instead of 7.