我已经从 ubuntu 卸载了 php7 及其所有模块,当我尝试重新安装模块时,每个 php 模块都会出现以下错误,尽管模块已安装,但由于此错误,它未激活并且无法使用他们。
有什么办法可以解决这个问题吗?
每个模块的错误(安装时):
Not replacing deleted config file /etc/php/7.0/mods-available/intl.ini
WARNING: Module [module name] ini file doesn't exist under /etc/php/7.0/mods-available
WARNING: Module [module name] ini file doesn't exist under /etc/php/7.0/mods-available
WARNING: Module [module name] ini file doesn't exist under /etc/php/7.0/mods-available
我来到这里是因为从 php 7.0 升级到 7.1 后我在 Ubuntu 上安装 Phpmyadmin 时遇到问题
这是窍门
-
删除 php 版本(例如 7.0 - 调整命令行)
sudo apt-get purge php7.0-common
注意 --> 您应该检查将被删除的软件包列表。
-
安装php模块
sudo apt-get install php7.1-mbstring
sudo apt-get install php7.1-mcrypt
...
-
激活模块
须藤 phpenmod mbstring
须藤 phpenmod mcrypt
(apache的选项)激活php7.1
sudo a2enmod php7.1
当然,重新启动您的服务器(在本例中为 apache)
sudo systemctl restart apache2
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)