VeryPDF HTML to PDF Converter Command Line (Web Scraper, Web to PDF Converter) for SUSE Linux Enterprise Server 15 SP5

The VeryPDF HTML to PDF Converter Command Line (Web Scraper and Web to PDF Converter) is a powerful tool designed to convert HTML webpages to PDF files directly from the command line. This solution is ideal for automating the conversion process on various Linux distributions, including SUSE Linux Enterprise Server (SLES) 15 SP5. The ability to integrate this tool into your workflow opens up a variety of use cases, such as archiving web content, generating PDFs for reports, or capturing dynamic content from online sources.

image

However, users may encounter some issues when setting up the VeryPDF HTML to PDF Converter, particularly with dependency management on certain Linux distributions like SLES 15 SP5. Below, we will address a specific error reported by one of our customers and provide a solution to resolve it.

Error Message:

One of the users encountered the following error message when attempting to run the htmltopdf command:

htmltopdf: error while loading shared libraries: libpng15.so.15: cannot open shared object file: No such file or directory

Explanation of the Issue:

This error indicates that the system is unable to find the libpng15.so.15 shared library, which is a dependency for the HTML to PDF conversion process. Specifically, libpng15 is required for handling PNG image files, which may be included in the HTML content being converted. If this library is missing or incompatible with the current version of your Linux system, the command will fail.

Upon reviewing the system's library dependencies using the ldd command, we can see that libpng15.so.15 was indeed not found, and libpng16.so.16 was linked instead, which indicates that the system might have a newer version of the PNG library installed.

System Information Provided by the Customer:

  • Operating System:
    # OS RELEASE
    hec42v261424:/usr/lib64 # cat /etc/os-release
    NAME="SLES"
    VERSION="15-SP5"
    VERSION_ID="15.5"
    PRETTY_NAME="SUSE Linux Enterprise Server 15 SP5"
    ID="sles"
    ID_LIKE="suse"
    ANSI_COLOR="0;32"
    CPE_NAME="cpe:/o:suse:sles:15:sp5"
    
    # DEPENDENCIES
    hec42v261424:/usr/lib64 # ldd /mnt/data_qh1/tmp/html2pdf/htmltopdf
    linux-vdso.so.1 (0x00007ffc435fb000)
    libjpeg.so.62 => /usr/lib64/libjpeg.so.62 (0x00007f4014200000)
    libpng15.so.15 => not found
    libXrender.so.1 => /usr/lib64/libXrender.so.1 (0x00007f4013e00000)
    libfontconfig.so.1 => /usr/lib64/libfontconfig.so.1 (0x00007f4013a00000)
    libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00007f4013600000)
    libXext.so.6 => /usr/lib64/libXext.so.6 (0x00007f4013200000)
    libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007f40140bf000)
    libssl.so.10 => not found
    libcrypto.so.10 => not found
    libz.so.1 => /usr/lib64/libz.so.1 (0x00007f4014591000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00007f401458a000)
    librt.so.1 => /lib64/librt.so.1 (0x00007f4014580000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f401455c000)
    libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f4012fbb000)
    libm.so.6 => /lib64/libm.so.6 (0x00007f4013cb4000)
    libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f4014538000)
    libc.so.6 => /lib64/libc.so.6 (0x00007f4012dc4000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f40145c0000)
    libexpat.so.1 => /usr/lib64/libexpat.so.1 (0x00007f40144f7000)
    libuuid.so.1 => /usr/lib64/libuuid.so.1 (0x00007f40144ef000)
    libbz2.so.1 => /usr/lib64/libbz2.so.1 (0x00007f4012a00000)
    libpng16.so.16 => /usr/lib64/libpng16.so.16 (0x00007f4012600000)
    libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007f40144c5000)
    libXau.so.6 => /usr/lib64/libXau.so.6 (0x00007f4012200000)
    
  • Libraries and Dependencies:
    • Missing libpng15.so.15
    • libpng16.so.16 is available and linked
    • Missing OpenSSL libraries (libssl.so.10, libcrypto.so.10)
    • Missing libz, glibc, bzip2-libs, xz-libs
    • Other libraries like libjpeg.so.8, libfontconfig.so.1, libfreetype.so.6, and libX11.so.6 were found and correctly linked.

Resolution Steps:

1. Install Missing Dependencies:

Since your system is missing the libpng15.so.15 library, it can be replaced by the newer libpng16.so.16 version. You can create a symbolic link to make libpng16.so.16 work as libpng15.so.15.

To do this, run the following command:

sudo ln -s /usr/lib64/libpng16.so.16 /usr/lib64/libpng15.so.15

This will create a symbolic link for the libpng15.so.15 library, pointing to the libpng16.so.16 file.

2. Resolve OpenSSL Library Issues:

The error message also indicates that the OpenSSL libraries (libssl.so.10 and libcrypto.so.10) are missing. Since SUSE 15 SP5 might use newer versions of OpenSSL, you can install them using the following command:

sudo zypper install libopenssl1_0_0

3. Install Other Missing Libraries:

Your system might also be missing some other libraries that are required for running the VeryPDF HTML to PDF Converter. To ensure all dependencies are met, you can try installing the missing libraries using zypper (SUSE's package manager):

sudo zypper install libz1 glibc bzip2-libs xz-libs

4. Compile libpng15 from Source:

If the required libpng15 version is not available in the system repositories or cannot be linked from libpng16, you can compile libpng15 from source. Here are the steps to do so:

Step 4.1: Install Build Tools and Dependencies

You will need development tools and the zlib library to compile libpng from source. Install them first:

sudo zypper install -y gcc gcc-c++ make automake libtool zlib-devel
Step 4.2: Download the libpng15 Source Code

You can download the libpng15 source code from the official libpng archive:

wget https://sourceforge.net/projects/libpng/files/libpng15/1.5.30/libpng-1.5.30.tar.gz
Step 4.3: Extract the Source Code

After downloading, extract the libpng source code:

tar -xzvf libpng-1.5.30.tar.gz
cd libpng-1.5.30
Step 4.4: Configure the Build

Run the configure script to prepare the build environment:

./configure --prefix=/usr/local
Step 4.5: Compile and Install

Compile and install libpng15:

make
sudo make install

This will install libpng15 in /usr/local/lib (or another directory if specified).

Step 4.6: Create Symbolic Links (Optional)

To make sure the system can find libpng15.so.15, create a symbolic link:

sudo ln -s /usr/local/lib/libpng15.so.15 /usr/lib64/libpng15.so.15
Step 4.7: Update the Dynamic Linker Cache

Run the following command to update the dynamic linker’s cache:

sudo ldconfig

5. Alternative Solutions:

  • If you're unable to install libraries directly due to system limitations, consider bundling the required dependencies with the VeryPDF HTML to PDF Converter package itself.
  • You could also look into using static linking for the libraries, where the dependencies are compiled directly into the executable, thus eliminating the need for separate library files.

The error libssl.so.10 => not found and libcrypto.so.10 => not found indicates that the system is unable to find the required OpenSSL libraries (libssl.so.10 and libcrypto.so.10). This could be due to missing or outdated OpenSSL libraries on your system. Here's how to resolve the issue:

1. Install OpenSSL 1.0.0 (which provides libssl.so.10 and libcrypto.so.10):

In SUSE Linux Enterprise Server 15 SP5, OpenSSL 1.0.0 might not be included by default, as newer versions (such as OpenSSL 1.1.x) are often used. You can install the required OpenSSL version by using the following steps:

Install OpenSSL 1.0.0:

1. Add OpenSSL 1.0.0 Repository:
You can install OpenSSL 1.0.0 by enabling the appropriate repository. Run the following command to check for the OpenSSL 1.0.0 package:

sudo zypper install libopenssl1_0_0

This should install the required libraries (libssl.so.10 and libcrypto.so.10).

2. Verify Installation:
After installation, you can verify the libraries are available by running:

ls /usr/lib64 | grep libssl
ls /usr/lib64 | grep libcrypto

You should see libssl.so.10 and libcrypto.so.10 listed.

2. Create Symbolic Links (if the library is available but not linked):

If you already have the newer OpenSSL libraries installed (like libssl.so.1.1), and the required version libssl.so.10 is not found, you can create symbolic links to map the new libraries to the old ones.

1. Check for available OpenSSL libraries:
Run the following command to check for the installed versions:

ls /usr/lib64 | grep libssl
ls /usr/lib64 | grep libcrypto

2. Create Symbolic Links:
If you see libssl.so.1.1 and libcrypto.so.1.1, you can create symbolic links to libssl.so.10 and libcrypto.so.10 like this:

sudo ln -s /usr/lib64/libssl.so.1.1 /usr/lib64/libssl.so.10
sudo ln -s /usr/lib64/libcrypto.so.1.1 /usr/lib64/libcrypto.so.10

This will make the newer version of OpenSSL work as if it were version 1.0.0, allowing the application to find the required libraries.

3. Update Dynamic Linker Cache:

If you created symbolic links, or if you've installed new libraries, you should update the dynamic linker cache by running:

sudo ldconfig

This ensures that the system is aware of the newly installed or linked libraries.

4. Alternative Solution - Compile OpenSSL 1.0.0 from Source:

If you're unable to find the required OpenSSL version from the repository or it is not compatible with your system, you can compile OpenSSL 1.0.0 from source:

1. Download OpenSSL 1.0.0 Source Code:

wget https://www.openssl.org/source/openssl-1.0.2u.tar.gz
tar -xvf openssl-1.0.2u.tar.gz
cd openssl-1.0.2u

2. Configure and Compile OpenSSL:

./config --prefix=/usr/local
make
sudo make install

3. Create Symbolic Links (if needed):
After installation, you can create the necessary symbolic links to ensure the libraries are accessible:

sudo ln -s /usr/local/lib64/libssl.so.10 /usr/lib64/libssl.so.10
sudo ln -s /usr/local/lib64/libcrypto.so.10 /usr/lib64/libcrypto.so.10

4. Update Dynamic Linker Cache:

sudo ldconfig

To solve the libssl.so.10 and libcrypto.so.10 not found issue:

  • Try installing the OpenSSL 1.0.0 libraries (libopenssl1_0_0).
  • If they are missing, you can create symbolic links to newer versions like libssl.so.1.1 and libcrypto.so.1.1.
  • Alternatively, compile OpenSSL 1.0.0 from source and link it manually.

Conclusion:

The issue faced by the customer arises from missing or incompatible libraries on SUSE Linux Enterprise Server 15 SP5. By installing the required dependencies or linking the newer library versions to the expected paths, or by compiling libpng15 from source, users can resolve the error and successfully run the VeryPDF HTML to PDF Converter.

If additional help is required, our support team can assist in packaging the required libraries or providing further troubleshooting steps.

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *


Verify Code   If you cannot see the CheckCode image,please refresh the page again!