Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to install php5-cli on ubuntu but i keep getting this error

Reading package lists... Done
Building dependency tree       
Reading state information... Done
php5-cli is already the newest version.
The following packages were automatically installed and are no longer required:
  linux-headers-2.6.31-14
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 31 not upgraded.
2 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Setting up php5-cli (5.2.10.dfsg.1-2ubuntu6.3) ...
dpkg (subprocess): unable to execute installed post-installation script: Exec format error
dpkg: error processing php5-cli (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of php-pear:
 php-pear depends on php5-cli | php4-cli; however:
  Package php5-cli is not configured yet.
  Package php4-cli is not installed.
dpkg: error processing php-pear (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                          Errors were encountered while processing:
 php5-cli
 php-pear
E: Sub-process /usr/bin/dpkg returned an error code (1)

What should i do

share|improve this question

2 Answers 2

up vote 0 down vote accepted

can you show me output of this command:
dpkg -l | grep php
Seems yout wanted to isntall php4 before.

--
Regards,
Robert

share|improve this answer

You might try the --fix-broken option with apt-get.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.