blog

linuxにWkhtmltoxをインストールする

centosのインストールは、通常のシステムをインストールし、更新した後に依存関係が不足しているプロンプトが表示されます:ここでは、直接パッケージをインストールするプロンプトに従うことができ、再度イン...

Apr 15, 2020 · 1 min. read
Share this

centos

# wget https://..org/.12/..5/wkhtmltox-..5-..x86_.rpm
# rpm -ivh wkhtmltox-0.12.5-1.centos7.x86_64.rpm

通常のシステムでは、インストールやアップデートの後に、依存関係がないかどうかを確認するプロンプトが表示されます:

error: Failed dependencies:
	fontconfig is needed by wkhtmltox-1:0.-1.x86_64
	freetype is needed by wkhtmltox-1:0.-1.x86_64
	libpng is needed by wkhtmltox-1:0.-1.x86_64
	libjpeg is needed by wkhtmltox-1:0.-1.x86_64
	libX11 is needed by wkhtmltox-1:0.-1.x86_64
	libXext is needed by wkhtmltox-1:0.-1.x86_64
	libXrender is needed by wkhtmltox-1:0.-1.x86_64
	xorg-x11-fonts-Type1 is needed by wkhtmltox-1:0.-1.x86_64
	xorg-x11-fonts-75dpi is needed by wkhtmltox-1:0.-1.x86_64

ここでは、プロンプトに従って直接パッケージをインストールできます。

# yum install fontconfig freetype libpng libjpeg libX11 libXext libXrender xorg-x11-fonts-Type1 xorg-x11-fonts-75dpi

その後、もう一度インストールコマンドを実行すると、正常にインストールされます。

# rpm -ivh wkhtmltox-0.12.5-1.centos7.x86_64.rpm
# wkhtmltopdf -V
# wkhtmltopdf --enable-forms https://..com .pdf
Read next

var、let、constの違い

ES6の登場により、varは変数を定義する唯一の方法ではなくなりました。まず第一に、varを使った変数定義にはこのようなバグがあります: 1. jsにはブロックレベルのスコープがなく、js関数内でvarを使って変数を定義すると、その関数本体全体がスコープされます。forループの外側

Apr 15, 2020 · 2 min read