我使用的是Ubuntu 16.04 LTS
PHP 7.0.13 NetBean
我尝试在NetBeans环境中运行与composer链接的一些操作 我有这些日志
"/usr/local/ampps/php-7.0/bin/php" "/home/arfa/www/composer.phar" "--ansi" "--no-interaction" "self-update"
Fatal error: Uncaught Error: Call to undefined function Symfony\Polyfill\Mbstring\iconv() in phar:///home/arfa/www/composer.phar/vendor/symfony/polyfill-mbstring/Mbstring.php:520
Stack trace:
#0 phar:///home/arfa/www/composer.phar/vendor/symfony/polyfill-mbstring/bootstrap.php(46): Symfony\Polyfill\Mbstring\Mbstring::mb_strwidth(' [Composer\\Exc...', 'ASCII')
#1 phar:///home/arfa/www/composer.phar/vendor/symfony/console/Application.php(1106): mb_strwidth(' [Composer\\Exc...', 'ASCII')
#2 phar:///home/arfa/www/composer.phar/vendor/symfony/console/Application.php(650): Symfony\Component\Console\Application->stringWidth(' [Composer\\Exc...')
#3 phar:///home/arfa/www/composer.phar/vendor/symfony/console/Application.php(131): Symfony\Component\Console\Application->renderException(Object(Composer\Exception\NoSslException), Object(Symfony\Component\Console\Output\StreamOutput))
#4 phar:///home/arfa/www/composer.phar/src/Composer/Console/Application.php(100): Symfony\Component\Console\Application->run(Object(Symfony\Component\ in phar:///home/arfa/www/composer.phar/vendor/symfony/polyfill-mbstring/Mbstring.php on line 520
Done.
问题与我的项目,symfony,设置有关。
答案 0 :(得分:0)
您是否启用了iconv扩展程序?
请发布此命令的回复:
php -i | grep -i "iconv support"
或者,在php.ini文件中搜索“extension = iconv.so”,如果已注释掉,请取消注释,并确保重新启动Apache。
如果失败,请尝试安装composer软件包:
composer require symfony/polyfill-iconv