RWMostert / pdf-to-image-lambda

A Chalice-based AWS Lambda function to convert a PDF document in a source S3 bucket to an image.
15 stars 8 forks source link

liblcms2.so.2: cannot open shared object file: No such file or directory #4

Open untether-imran opened 3 years ago

untether-imran commented 3 years ago

On running this repo on AWS Lambda, I m getting the following error.

[ERROR] PDFPageCountError: Unable to get page count.
/var/task/lib/poppler-utils-0.26/usr/bin/pdfinfo: error while loading shared libraries: liblcms2.so.2: cannot open shared object file: No such file or directory

Traceback (most recent call last):
  File "/var/task/chalice/app.py", line 1569, in __call__
    return self.handler(event_obj)
  File "/var/task/app.py", line 75, in pdf_to_image
    images = convert_from_bytes(infile,
  File "/var/task/pdf2image/pdf2image.py", line 283, in convert_from_bytes
    return convert_from_path(
  File "/var/task/pdf2image/pdf2image.py", line 98, in convert_from_path
    page_count = pdfinfo_from_path(pdf_path, userpw, poppler_path=poppler_path)["Pages"]
  File "/var/task/pdf2image/pdf2image.py", line 488, in pdfinfo_from_path
    raise PDFPageCountError(
batorgil-it commented 2 years ago

same here