Reputation: 1048
How to install php extension for tidy html on a beanstalk with amazon linux 2?
I have tried the following
commands:
1-aml-extras-epel:
command: "amazon-linux-extras install epel -y"
2-epel:
command: "yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm -y"
3-yum-clean:
command: "yum clean all"
4-tidy-php:
command: "yum install php74-php-tidy.x86_64 -y"
All of the commands run correctly but I get the following error at runtime of php scripts:
Class 'tidy' not found
Upvotes: 0
Views: 1560
Reputation: 1048
In the end I forgot to enable the php module·
Here the full beanstalk config file, so I wrote and added the command.
Note 1. this install the module for php 7.4
Note 2. for command 2-epel we have been forced to use the option "ignoreErrors": true, cause otherwise the deploy procedure will fail cause remi results already installed.
files:
"/usr/local/bin/enable-tidy-php-module.sh":
mode: "000755"
owner: root
group: root
content: |
#!/bin/bash
cd /etc/php.d/
ln -s /etc/opt/remi/php74/php.d/20-tidy.ini 20-tidy.ini
cd /usr/lib64/php/modules/
ln -s /opt/remi/php74/root/usr/lib64/php/modules/tidy.so tidy.so
cd /usr/lib64/php-zts/modules/
ln -s /opt/remi/php74/root/usr/lib64/php/modules/tidy.so tidy.so
exit 0
commands:
1-aml-extras-epel:
command: "amazon-linux-extras install epel -y"
2-epel:
command: "yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm -y"
ignoreErrors: true
3-yum-clean:
command: "yum clean all"
4-tidy-php:
command: "yum install php74-php-tidy.x86_64 -y"
5-enable-tidy-php:
command: "/usr/local/bin/enable-tidy-php-module.sh"
Upvotes: -1
Reputation: 7031
You cannot pull a single package/extension from "remi" repository, you must take the full stack from the same repository.
For a proper configuration, simply follow the Wizard instructions.
Upvotes: 1