Missing php-redis repository in docker debian stretch image
✔ Recommended Answer
If you use php:7.1-fpm-stretch container, all php-*** packages are blocked for installation, see detail here: https://github.com/docker-library/php/issues/713
This leads to the following documentation in their github repository:
Which explains the following:
The proper solution to this error is to either use FROM debian:XXX and install Debian's PHP packages directly, or to use docker-php-ext-install, pecl, and/or phpize to install the necessary additional extensions and utilities.
Source: stackoverflow.com
Answered By: Lan Phan
If you're encountering a missing php-redis repository issue when using the Debian Stretch Docker image, it could be due to a missing or outdated package repository. Here's how you can fix this issue:
Update the package repository on your Docker image by running the following command:
sqlapt-get update
Install the required dependencies by running the following command:
arduinoapt-get install -y git wget php-dev libhiredis-dev
Clone the phpredis repository by running the following command:
bashgit clone https://github.com/phpredis/phpredis.git /usr/src/phpredis
Change to the directory where the phpredis repository was cloned and build the phpredis extension by running the following commands:
bashcd /usr/src/phpredis phpize ./configure --enable-redis-igbinary make make install
Add the following line to your
php.ini
file to enable the phpredis extension:makefileextension=redis.so
Restart your PHP service to apply the changes by running the following command:
service php7.3-fpm restart
By following these steps, you should be able to install and enable the phpredis extension in your Debian Stretch Docker image. Note that you may need to modify some of the commands above based on your specific Docker image setup.
Comments
Post a Comment