Recentemente eu estava testando a criação de projetos PHP com Symfony, assim instalei o CLI do Symfony e tentei executar um projeto de exemplo com template “webapp”, quando me deparei com esse problema:
symfony new example_app --webapp
* Creating a new Symfony project with Composer
Creating a "symfony/skeleton" project at "./example_app"
Cannot use symfony/skeleton's latest version v7.2.99 as it requires ext-iconv * which is missing from your platform.
Cannot use symfony/skeleton v5.0.99 as it requires php ^7.2.5 which is not satisfied by your platform.
Lendo mais sobre o erro, diz que falta um tal de “ext-iconv”. Então pesquisei por ele e descobri que é uma extensão do PHP que não vem habilitado nas versões recentes do PHP e serve para conversão de caracteres.
Testando requerimentos
Descobri também que, para diagnosticar melhor estes erros, basta executar este comando do Symfony:
symfony check:requirements
Irá testar e exibir tudo o que o Symfony precisa para funcionar corretamente:
Symfony Requirements Checker
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> PHP is using the following php.ini file:
/etc/php/php.ini
> Checking Symfony requirements:
E..............WW.........
[ERROR]
Your system is not ready to run Symfony projects
Fix the following mandatory requirements
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* iconv() must be available
> Install and enable the iconv extension.
Optional recommendations to improve your setup
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* intl extension should be available
> Install and enable the intl extension (used for validators).
* a PHP accelerator should be installed
> Install and/or enable a PHP accelerator (highly recommended).
Note The command console can use a different php.ini file
~~~~ than the one used by your web server.
Please check that both the console and the web server
are using the same PHP version and configuration.
Então lendo os erros em “Fix the following mandatory requeriments”, abri o /etc/php/php.ini, como indicado nas primeiras linhas e removi o comentário da linha que habilita a extensão “iconv”.

E pronto, consegui usar normalmente. 🙂