Adicionando uma CLI para PHP5 no servidor ativo

Adicionando uma CLI para PHP5 no servidor ativo

Quero adicionar suporte de linha de comando para PHP5 em meu servidor. Quando executo, aptitude install php5-clirecebo uma mensagem dizendo que meus módulos/pacotes PHP têm dependências não atendidas.

Aqui está uma lista de pacotes que sofrem com essas "dependências não atendidas" e precisam de atualização:

  • php5-gd
  • php5-curl
  • php5-mysql
  • php5-cgi

Todos eles dependem do php5-common.

Posso atualizar os pacotes exatamente como o aptitude sugere, sem causar interrupções no site ativo?

Saída do aptitude

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Reading extended state information      
Initialising package states... Done
The following packages are BROKEN:
  libapache2-mod-php5 php5-cgi php5-curl php5-gd php5-mysql 
The following NEW packages will be installed:
  php5-cli 
The following packages will be upgraded:
  php5-common 
1 packages upgraded, 1 newly installed, 0 to remove and 123 not upgraded.
Need to get 3,511kB of archives. After unpacking 7,803kB will be used.
The following packages have unmet dependencies:
  php5-gd: Depends: php5-common (= 5.3.3-1ubuntu12~lucid) but 5.3.5-1ubuntu7.2ppa1~lucid is to be installed.
  php5-curl: Depends: php5-common (= 5.3.3-1ubuntu12~lucid) but 5.3.5-1ubuntu7.2ppa1~lucid is to be installed.
  php5-mysql: Depends: php5-common (= 5.3.3-1ubuntu12~lucid) but 5.3.5-1ubuntu7.2ppa1~lucid is to be installed.
  php5-cgi: Depends: php5-common (= 5.3.3-1ubuntu12~lucid) but 5.3.5-1ubuntu7.2ppa1~lucid is to be installed.
  libapache2-mod-php5: Depends: php5-common (= 5.3.3-1ubuntu12~lucid) but 5.3.5-1ubuntu7.2ppa1~lucid is to be installed.
The following actions will resolve these dependencies:

Upgrade the following packages:
libapache2-mod-php5 [5.3.3-1ubuntu12~lucid (now) -> 5.3.5-1ubuntu7.2ppa1~lucid (lucid)]
php5-cgi [5.3.3-1ubuntu12~lucid (now) -> 5.3.5-1ubuntu7.2ppa1~lucid (lucid)]
php5-curl [5.3.3-1ubuntu12~lucid (now) -> 5.3.5-1ubuntu7.2ppa1~lucid (lucid)]
php5-gd [5.3.3-1ubuntu12~lucid (now) -> 5.3.5-1ubuntu7.2ppa1~lucid (lucid)]
php5-mysql [5.3.3-1ubuntu12~lucid (now) -> 5.3.5-1ubuntu7.2ppa1~lucid (lucid)]

Score is 340

Responder1

Minha resposta étalvez! ;-)

PHP 5.3.3 a 5.3.5 não deveria importar. Isto é, a menos que o Ubuntu/Debian tenha feito algo ainda mais louco. Mas versões pontuais (por exemplo, 5.3.x a 5.3.y) nunca devem quebrar um conjunto de recursos.

Isso quer dizer que espero que você não tenha feito truques malucos e, por exemplo, tenha contado com bugs no 5.3.3 que foram corrigidos no 5.3.5 e, portanto, causariam uma regressão. A maneira mais fácil de testar isso é ativar uma VM de teste e ver se seu site funciona (ou melhor ainda: seu conjunto de testes funciona).

Outro truque é tentar instalar o 5.3.3 – aqui está uma ideia (observe que minha versão é diferente):

# apt-cache showpkg php5-cli
Package: php5-cli
Versions: 
5.2.10.dfsg.1-2ubuntu6.10
...

(Eu trunquei a saída.)

Em seguida, instale com:

# apt-get install php5-cli=5.2.10.dfsg.1-2ubuntu6.10
...

HTH

Responder2

Você está usando o Nginx PPA e o Aptitude tenta atualizar pacotes para versões mais recentes. Se você deseja instalar o php5-cli do repositório Ubuntu, você deve usar o aptitude install php5-cli=5.3.3-1ubuntu12~lucid.

informação relacionada