Problema ao instalar o php 7 no Ubuntu 14.04

2

Estou usando o Ubuntu 14.04 e estou tentando instalar o PHP 7. Estou fazendo algo errado. Eu segui essas instruções .

Se eu digitar 'php -v' no terminal, ele mostrará o arquivo php 7.

No entanto, se eu olhar para o meu phpinfo (), a saída ainda mostrará meu antigo php 5.

Agora, quando tento instalar algo que requer o php 7, recebo o seguinte erro:

    Your requirements could not be resolved to an installable set of packages.

        Problem 1
          - Installation request for alchemy/zippy 0.3.5 -> satisfiable by 
alchemy/zippy[0.3.5].
          - alchemy/zippy 0.3.5 requires ext-mbstring * -> the requested PHP 
extension mbstring is missing from your system.
        Problem 2
          - Installation request for easyrdf/easyrdf 0.9.1 -> satisfiable by 
easyrdf/easyrdf[0.9.1].
          - easyrdf/easyrdf 0.9.1 requires ext-mbstring * -> the requested 
PHP extension mbstring is missing from your system.
        Problem 3
          - Installation request for phpunit/phpunit 4.8.27 -> satisfiable by
 phpunit/phpunit[4.8.27].
          - phpunit/phpunit 4.8.27 requires ext-dom * -> the requested PHP 
extension dom is missing from your system.
        Problem 4
          - alchemy/zippy 0.3.5 requires ext-mbstring * -> the requested PHP 
extension mbstring is missing from your system.
          - drupal/console 0.11.3 requires alchemy/zippy 0.3.5 -> satisfiable
 by alchemy/zippy[0.3.5].
          - Installation request for drupal/console 0.11.3 -> satisfiable by 
drupal/console[0.11.3].

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

Alguém tem alguma idéia do que eu preciso corrigir para executar o php 7 no meu sistema?

    
por Sage 24.09.2016 / 02:21

1 resposta

8

A saída de erro que você colou diz tudo - você está sem as extensões mbstring e dom . Aqueles podem ser instalados usando:

sudo apt-get install php7.0-dom php7.0-mbstring

Os pacotes com extensões PHP possuem o campo Provides: correto, então os pacotes certos serão escolhidos.

    
por oerdnj 26.09.2016 / 21:29