关闭。这个问题需要更加集中。它目前不接受答案。想改进这个问题?更新问题,使其仅通过编辑此帖子专注于一个问题。 4年前关闭。改进这个问题
我最近尝试通过 Composer 安装软件包,但出现错误 the requested PHP extension mbstring is missing from your system.
我从 php.ini
中删除了分号,但它仍然不起作用。我应该怎么办?
php.ini
中的 mbstring
设置未注释?
sudo apt-get install php-mbstring
# if your are using php 7.1
sudo apt-get install php7.1-mbstring
# if your are using php 7.2
sudo apt-get install php7.2-mbstring
# if your are using php 7.4
sudo apt-get install php7.4-mbstring
找到您的 php.ini 确保设置了指令 extension_dir=C:\path\to\server\php\ext 并调整路径(设置您的 PHP 扩展目录)确保设置了指令 extension=php_mbstring.dll(未注释)
如果这不起作用并且缺少 php_mbstring.dll 文件,那么这个堆栈的 PHP 安装就会被破坏。
对于 php 7.1
sudo apt-get install php7.1-mbstring
干杯!
我设置 PHPRC 变量并在 php.ini
中取消注释 zend_extension=php_opcache.dll
并且一切正常。
不定期副业成功案例分享
sudo apt-get install php5.6-mbstring
。使用apt-cache search mbstring
进行搜索以查看哪些版本适用于您的系统。apt-get install php7.1-mbstring
也适合我Unable to locate package php-mbstring
错误,请先尝试运行sudo apt-get update
。apt-get install php7.2-mbstring