1

I've screwed my raspbian (debian) installation. To fix this I'm going through reinstalling every single package. This is tiresome (or rather: slow) but works in general.

Where I'm absolutely stuck is reinstalling the PHP packages I need most:

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

As other php5 modules are failing as well I'm reluctant to just remove the post install scripts -- I'd need to remove a couple of them to get PHP installing.

To see what's wrong with the post install I've run it manually:

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  

Only running the last command gives:

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

It does however exit with code 20, not 10- so I'm not sure I'm really looking in the right place.

Running with -d9 shows:

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

What can I do to find/cure the source of the post installation issues?

  • Do you know the error is in the last line? – Faheem Mitha Jun 9 '14 at 23:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.