我正在使用以下方式运行本地网站:
- Contao 4.13 CMS
- Ubuntu 20.04
- Apache2
- PHP 8.1
我已将上述网站从 Contao 3.5.40 和 PHP 5.6 升级。网站内容显示正常,但缺少一些标题图像,搜索栏损坏。
我检查了 apache2 错误日志以尝试找到问题的根源,并在其中发现:
[Fri Jan 05 11:57:04.458185 2024] [mpm_prefork:notice] [pid 128763] AH00169: caught SIGTERM, shutting down
PHP Warning: PHP Startup: Unable to load dynamic library 'openssl' (tried: /usr/lib/php/20210902/openssl (/usr/lib/php/20210902/open>
PHP Warning: Module "intl" is already loaded in Unknown on line 0
[Fri Jan 05 11:57:04.563161 2024] [mpm_prefork:notice] [pid 128837] AH00163: Apache/2.4.41 (Ubuntu) configured -- resuming normal ope>
[Fri Jan 05 11:57:04.563230 2024] [core:notice] [pid 128837] AH00094: Command line: '/usr/sbin/apache2'
我去检查我的 PHP 扩展目录/usr/lib/php/20210902/
,发现文件中确实没有 openssl
我试过了sudo apt-get install php8.1-openssl
但它返回:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php8.1-openssl
E: Couldn't find any package by glob 'php8.1-openssl'
E: Couldn't find any package by regex 'php8.1-openssl'
我已确保文件extension=openssl
中该行已被取消注释php.ini
。
我也尝试过使用 PHP 源代码和命令
./configure --with-openssl
make
sudo make install
运气不好。关于如何获取扩展,或者问题是否出在其他地方,您有什么想法吗?