我想在 ubuntu 上安装 php5-cli 但我一直收到此错误
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)
我应该怎么办
答案1
你能向我展示这个命令的输出吗:
dpkg -l | grep php
似乎你之前想要安装 php4。
——
问候,
罗伯特
答案2
您可以尝试--fix-broken
使用 选项apt-get
。