I made a note because I stumbled on various things when I installed wkhtmltopdf in the Amazon Linux 2 environment on the container. Check the basic procedure below. https://laox.com/ja/9mcv
cd /tmp
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox-0.12.6-1.centos6.x86_64.rpm
yum install -y xorg-x11-fonts-75dpi xorg-x11-fonts-Type1
rpm -Uvh wkhtmltox-0.12.6-1.centos6.x86_64.rpm
When I run it ...
rpm -Uvh wkhtmltox-0.12.6-1.centos6.x86_64.rpm
error: Failed dependencies:
openssl is needed by wkhtmltox-1:0.12.6-1.centos6.x86_64
Apparently, the downloaded / saved file name is different from the required file name.
pwd
/tmp
ls -ltr
total 13252
-rw-r--r-- 1 root root 13564280 Jun 11 2020 wkhtmltox-0.12.6-1.centos6.x86_64.rpm
By the way, the rpm options are as follows.
-U: rpm -U <rpm_file> can perform either upgrade or installation functions as needed for the package. -vh: With the -v and -h options (combined with -U), rpm displays the verbose output and uses the hash mark to display the progress meter.
https://access.redhat.com/documentation/ja-jp/red_hat_enterprise_linux/6/html/deployment_guide/sec-installing_and_upgrading
Why can't I use the downloaded file name as it is? By the way, when I tried to download openssl with the desired file name, I got a 404 error. I thought about renaming the file, but I think it's different. Examine the package dependencies.
rpm -qRp wkhtmltox-0.12.6-1.centos6.x86_64.rpmca-certificates
fontconfig
freetype
glibc
libX11
libXext
libXrender
libjpeg
libpng
libstdc++
openssl
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1
xorg-x11-fonts-75dpi
xorg-x11-fonts-Type1
zlib
Are all of these dependencies installed? I decided to try it with the yum command.
yum install -y wkhtmltox-0.12.6-1.centos6.x86_64.rpm
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/3): make-3.82-24.amzn2.x86_64.rpm | 420 kB 00:00:00
(2/3): openssl-1.0.2k-19.amzn2.0.4.x86_64.rpm | 495 kB 00:00:00
(3/3): openssl-libs-1.0.2k-19.amzn2.0.4.x86_64.rpm | 1.2 MB 00:00:00
It seems that they are doing it from the download of the package that seems to be missing. as a result,
wkhtmltopdf -V
wkhtmltopdf 0.12.6 (with patched qt)
Installed! Yum seems to work because it installs dependent packages as well.
Garbled characters occur when I try to use it!
Since the work is root and the actual use is apache, is it a permission problem? You can read it if you think.
ls -ltr /usr/share/fonts/IPAexfont00301/
total 13524
-rw-r--r-- 1 root root 7776964 Dec 21 16:17 ipaexm.ttf
-rw-r--r-- 1 root root 6041284 Dec 21 16:17 ipaexg.ttf
-rw-r--r-- 1 root root 1592 Dec 21 16:17 Readme_IPAexfont00301.txt
-rw-r--r-- 1 root root 20564 Dec 21 16:17 IPA_Font_License_Agreement_v1.0.txt
Recommended Posts