PHP安装phpwkhtmltopdf
1,安装composer
yum install composer -y
2,安装phpwkhtmltopdf
composer require mikehaertl/phpwkhtmltopdf
composer config repo.packagist composer https://mirrors.aliyun.com/composer/ require mikehaertl/phpwkhtmltopdf
无法安装报下面错
[Composer\Downloader\TransportException]
The "https://packgist.phpcomposer.com/packages.json" file could not be downloaded: php_network_getaddresses: getaddrinfo failed: Name or service not known
failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known
3,使用国内镜像
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
4,结果内存不够
PHP Warning: proc_open(): fork failed - Cannot allocate memory in phar:///usr/local/bin/composer/vendor/symfony/console/Application.php on line 973
Warning: proc_open(): fork failed - Cannot allocate memory in phar:///usr/local/bin/composer/vendor/symfony/console/Application.php on line 973