4

Criei uma máquina virtual com Vagrant e usei o PuPhpet. Entretanto quando executo o Composer tenho como retorno só essa lista de erro,já criei 4 maquinas diferentes e sempre o mesmo erro. Alguém aqui já passou por isso ?

$ composer create-project --prefer-dist laravel/laravel aforumLara
Installing laravel/laravel (v5.2.29)
  - Installing laravel/laravel (v5.2.29)
    Downloading: 100%         

Created project in aforumLara
> php -r "copy('.env.example', '.env');"
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - laravel/framework v5.2.9 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.2.8 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.2.7 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.2.6 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.2.5 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.2.4 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.2.3 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.2.29 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.2.28 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.2.27 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.2.26 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.2.25 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.2.24 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.2.23 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.2.22 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.2.21 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.2.20 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.2.2 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.2.19 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.2.18 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.2.17 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.2.16 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.2.15 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.2.14 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.2.13 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.2.12 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.2.11 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.2.10 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.2.1 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.2.0 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - Installation request for laravel/framework 5.2.* -> satisfiable by laravel/framework[v5.2.0, v5.2.1, v5.2.10, v5.2.11, v5.2.12, v5.2.13, v5.2.14, v5.2.15, v5.2.16, v5.2.17, v5.2.18, v5.2.19, v5.2.2, v5.2.20, v5.2.21, v5.2.22, v5.2.23, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.29, v5.2.3, v5.2.4, v5.2.5, v5.2.6, v5.2.7, v5.2.8, v5.2.9].

  To enable extensions, verify that they are enabled in those .ini files:
    - /etc/php/5.6/cli/php.ini
    - /etc/php/5.6/cli/conf.d/10-mysqlnd.ini
    - /etc/php/5.6/cli/conf.d/10-opcache.ini
    - /etc/php/5.6/cli/conf.d/10-pdo.ini
    - /etc/php/5.6/cli/conf.d/20-calendar.ini
    - /etc/php/5.6/cli/conf.d/20-ctype.ini
    - /etc/php/5.6/cli/conf.d/20-exif.ini
    - /etc/php/5.6/cli/conf.d/20-fileinfo.ini
    - /etc/php/5.6/cli/conf.d/20-ftp.ini
    - /etc/php/5.6/cli/conf.d/20-gettext.ini
    - /etc/php/5.6/cli/conf.d/20-iconv.ini
    - /etc/php/5.6/cli/conf.d/20-intl.ini
    - /etc/php/5.6/cli/conf.d/20-json.ini
    - /etc/php/5.6/cli/conf.d/20-mysqli.ini
    - /etc/php/5.6/cli/conf.d/20-pdo_mysql.ini
    - /etc/php/5.6/cli/conf.d/20-phar.ini
    - /etc/php/5.6/cli/conf.d/20-posix.ini
    - /etc/php/5.6/cli/conf.d/20-readline.ini
    - /etc/php/5.6/cli/conf.d/20-shmop.ini
    - /etc/php/5.6/cli/conf.d/20-sockets.ini
    - /etc/php/5.6/cli/conf.d/20-sysvmsg.ini
    - /etc/php/5.6/cli/conf.d/20-sysvsem.ini
    - /etc/php/5.6/cli/conf.d/20-sysvshm.ini
    - /etc/php/5.6/cli/conf.d/20-tokenizer.ini
    - /etc/php/5.6/cli/conf.d/zzzz_custom.ini
  You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
1

3 Respostas 3

2

Está faltando o módulo mbstring na sua vm:

Problem 1 - laravel/framework v5.2.9 requires ext-mbstring
the requested PHP extension mbstring is missing from your system.

Você pode adicionar um módulo PHP no PuPHPet através do menu "</> Languages" >> "PHP" >> "PHP Modules".

Ou pode instalar direto na VM:
PHP 5.x: $ sudo apt-get install mbstring
PHP 7: $ sudo apt-get install php7.0-mbstring

5
  • Obrigado,teintei esse comando mas sem sucesso.Tentei também habilitar a extensao do arquivo php.ini que em outros foruns foi sugerido,em todas as versões(inclusive diferentes de VM)o erro foi o mesmo,me pergunto no momento se essa versão do laravel pode esta apresentando erros.
    – Diego Go
    Commented 6/04/2016 às 15:59
  • @DiegoGo pode compartilhar mais detalhes? Versão do PHP, quais extensões aparecem no phpinfo, php.ini e a versão do composer? Posso tentar reproduzir o problema na minha máquina, para tentar te ajudar Commented 6/04/2016 às 17:47
  • tentei mas continua a dar o mesmo erro,acabei de instalar outra VM e o mesmo aconteceu.Me pergunto se algum arquivo da minha maquina fisica é usada na virtualizaçao ?
    – Diego Go
    Commented 6/04/2016 às 23:38
  • Problem 1 - laravel/framework v5.2.9 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system. - laravel/framework v5.2.8 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system. - laravel/framework v5.2.7 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system. - laravel/framework v5.2.6 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    – Diego Go
    Commented 6/04/2016 às 23:39
  • - /etc/php.ini - /etc/php.d/20-bz2.ini - /etc/php.d/20-calendar.ini - /etc/php.d/20-ctype.ini - /etc/php.d/20-curl.ini - /etc/php.d/20-exif.ini - /etc/php.d/20-fileinfo.ini - /etc/php.d/20-ftp.ini - /etc/php.d/20-gettext.ini
    – Diego Go
    Commented 6/04/2016 às 23:39
2

Percebe que estás a usar a versão 5.6 logo estas respostas não tão correctas pelo simples motivo de instalar modulos para a versão 7.0 do PHP

Tenta este comando:

$ sudo apt-get install libapache2-mod-php5.6 php5.6-cgi php5.6-cli php5.6-curl php5.6-imap php5.6-gd php5.6-mysql php5.6-pgsql php5.6-sqlite3 php5.6-mbstring php5.6-json php5.6-bz2 php5.6-mcrypt php5.6-xmlrpc php5.6-gmp php5.6-xsl php5.6-soap php5.6-xml php5.6-zip php5.6-dba

Este comando irá instalar todos os módulos do PHP, fica atento e selecciona os que pretendes.

Sempre é recomendado usares o PHP 7.0.

Para PHP 7.0:

sudo apt-get install libapache2-mod-php7.0 php7.0-common php7.0-mysql php7.0-curl php7.0-json php7.0-cgi php7.0-gd
1
  • foi útil pra mim, obrigado! Commented 9/02/2023 às 21:19
-1

Instale a extensão mbstring

sudo apt-get install php-mbstring 

Você deve fazer log-in para responder a esta pergunta.

Esta não é a resposta que você está procurando? Pesquise outras perguntas com a tag .