我搞砸了我的 raspbian (debian) 安装。为了解决这个问题,我将重新安装每个软件包。这很烦人(或者更确切地说:很慢),但总体上有效。
我绝对陷入困境的是重新安装我最需要的 PHP 软件包:
apt-get install php5-curl
Setting up php5-curl (5.4.4-14+deb7u10) ...
dpkg: error processing php5-curl (--configure):
subprocess installed post-installation script returned error exit status 10
由于其他 php5 模块也失败了,我不愿意删除安装后脚本——我需要删除其中几个才能安装 PHP。
为了查看安装后的问题,我手动运行了它:
pi@prodpi ~ $ sudo sh -x /var/lib/dpkg/info/php5-curl.postinst configure && echo &?
pi@prodpi ~ $ + set -e
+ inidir=/etc/php5/mods-available
+ [ configure = configure ]
+ inifile=curl.ini
+ sed -ne s/^; priority=\([0-9]\+\)$/\1/p /usr/share/php5/curl/curl.ini
+ priority=20
+ ucf /usr/share/php5/curl/curl.ini /etc/php5/mods-available/curl.ini
[2]+ Exit 10
仅运行最后一个命令给出:
pi@prodpi ~ $ sudo ucf -v /usr/share/php5/curl/curl.ini /etc/php5/mods-available/curl.ini
ucf: The new file is /usr/share/php5/curl/curl.ini
ucf: The Destination file is /etc/php5/mods-available/curl.ini
ucf: The Source directory is /usr/share/php5/curl
ucf: The State directory is /var/lib/ucf
The hash file exists
egrep [[:space:]]\/etc\/php5\/mods\-available\/curl\.ini$ /var/lib/ucf/hashfile
ucf: The new file is /usr/share/php5/curl/curl.ini
ucf: The Destination file is /etc/php5/mods-available/curl.ini
ucf: The Source directory is /usr/share/php5/curl
ucf: The State directory is /var/lib/ucf
The hash file exists
然而它确实以代码 20 退出,而不是 10 - 所以我不确定我是否真的在正确的位置寻找。
运行-d9
显示:
root@prodpi:/home/pi# ucf -v -d9 /usr/share/php5/curl/curl.ini /etc/php5/mods-available/curl.ini
ucf: The Debug value is 9
ucf: The new file is /usr/share/php5/curl/curl.ini
ucf: The Destination file is /etc/php5/mods-available/curl.ini
ucf: The Source directory is /usr/share/php5/curl
ucf: The State directory is /var/lib/ucf
The hash file exists
egrep [[:space:]]\/etc\/php5\/mods\-available\/curl\.ini$ /var/lib/ucf/hashfile
The new start file is `/usr/share/php5/curl/curl.ini\'
The destination is `/etc/php5/mods-available/curl.ini\' (`\/etc\/php5\/mods\-available\/curl\.ini\')
The history is kept under \'/usr/share/php5/curl\'
The file may be cached at \'/var/lib/ucf/cache/:etc:php5:mods-available:curl.ini\'
The destination file does not exist.
The old md5sum does not exist.
The new file exists, and has md5sum:
4e260877185bdf259be69a8165c00ab2 /usr/share/php5/curl/curl.ini
Historical md5sums are not available
ucf: The Debug value is 9
ucf: The new file is /usr/share/php5/curl/curl.ini
ucf: The Destination file is /etc/php5/mods-available/curl.ini
ucf: The Source directory is /usr/share/php5/curl
ucf: The State directory is /var/lib/ucf
The hash file exists
root@prodpi:/home/pi# $?
bash: 20: command not found
我可以做什么来查找/解决安装后问题的根源?