Como corrigir o comando para o PHP 7.0. * seguindo a instalação do PHP cli e git?

0

Estou usando o Ubuntu Linux 14.04 LTS de 64 bits no meu computador.

Acabei de atualizar todos os softwares e pacotes instalados no meu sistema executando os seguintes comandos do terminal:

sudo apt-get update

sudo apt-get upgrade

Agora estou usando o PHP 7.0.5 , a mais recente versão estável do PHP.

Para verificar, eu corro o seguinte comando do terminal:

php -v

PHP 7.0.5-3+donate.sury.org~trusty+1 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

Agora eu estava tentando instalar o Composer (The Project Dependency Management Software). Como um pré-requisito, é necessário que o cli e o Git sejam instalados então, para ele, digitei o seguinte comando e recebi o seguinte erro. Como resolver esse erro?

sudo apt-get install curl php5-cli git

Reading package lists... Done
Building dependency tree       
Reading state information... Done
curl is already the newest version.
curl set to manually installed.
git is already the newest version.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 php5-cli : Depends: php5-common (= 5.5.9+dfsg-1ubuntu4.14) but 5.5.32+dfsg-1+deb.sury.org~precise+1 is to be installed
            Recommends: php5-readline but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

O erro que desejo resolver é o seguinte da saída acima:

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 php5-cli : Depends: php5-common (= 5.5.9+dfsg-1ubuntu4.14) but 5.5.32+dfsg-1+deb.sury.org~precise+1 is to be installed
            Recommends: php5-readline but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Alguém, por favor, forneça o comando correto que eu preciso executar a partir do terminal e remova esse erro.

Acho que está ocorrendo, já que não estou mais usando o PHP 5.5.9 . Apenas me forneça o comando necessário.

Obrigado antecipadamente.

    
por PHPLover 20.04.2016 / 14:00

1 resposta

0

Pacotes do PHP 7.0 foram renomeados, então você está procurando pelo apt-get install php-cli para instalar o pacote de dependências que puxará a versão padrão do PHP, ou apenas apt-get install php7.0-cli . Eu recomendo o primeiro.

    
por oerdnj 22.04.2016 / 11:50