英文:
Installing PHP extension 'intl' on a PHP Docker image
问题
I'm having trouble installing the intl extension on the official php:8.1-apache Docker image running on Debian.
I've tried running the following commands:
apt install cron coreutils g++ zip unzip icu-dev libicu-dev libpng-dev libxml2-dev libzip-dev libonig-dev libxslt-dev php8.1-intl -y
docker-php-ext-configure intl
docker-php-ext-install pdo pdo_mysql mysqli gd opcache intl zip calendar dom mbstring xsls
docker-php-ext-enable intl
echo "extension=intl" >> /usr/local/etc/php/conf.d/docker-php-ext-intl.ini
I´m tested not all at once.
However, none of these solutions have worked for me. Can anyone suggest the correct configurations for this image? Thanks in advance for your help.
Some error logs on running
Warning: PHP Startup: Unable to load dynamic library 'intl' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20210902/intl (/usr/local/lib/php/extensions/no-debug-non-zts-20210902/intl: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20210902/intl.so (/usr/local/lib/php/extensions/no-debug-non-zts-20210902/intl.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
英文:
I'm having trouble installing the intl extension on the official php:8.1-apache Docker image running on Debian.
I've tried running the following commands:
apt install cron coreutils g++ zip unzip icu-dev libicu-dev libpng-dev libxml2-dev libzip-dev libonig-dev libxslt-dev php8.1-intl -y
docker-php-ext-configure intl
docker-php-ext-install pdo pdo_mysql mysqli gd opcache intl zip calendar dom mbstring xsls
docker-php-ext-enable intl
echo "extension=intl" >> /usr/local/etc/php/conf.d/docker-php-ext-intl.ini
I´m tested not all at once.
However, none of these solutions have worked for me. Can anyone suggest the correct configurations for this image? Thanks in advance for your help.
Some error logs on running
> Warning: PHP Startup: Unable to load dynamic library 'intl' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20210902/intl (/usr/local/lib/php/extensions/no-debug-non-zts-20210902/intl: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20210902/intl.so (/usr/local/lib/php/extensions/no-debug-non-zts-20210902/intl.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
答案1
得分: 2
以下是翻译好的部分:
"我不确定为什么那时候它没有工作。显然,我在某个地方卡住了。以下命令完美运行:
apt install libicu-dev -y
docker-php-ext-install intl
docker-php-ext-enable intl"
英文:
I'm not sure why it didn't work back then. Apparently, I got stuck somewhere. The following commands work perfectly:
apt install libicu-dev -y
docker-php-ext-install intl
docker-php-ext-enable intl
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论