I faced with this problem when I was trying to install openVPN via SSH like “apt-get install openvpn”, due to some PHP5 packages were unable to update.
After that I was trying to fix packages installation via “apt-get -f install” and I was getting error
“dpkg: error processing /var/cache/apt/archives/dpkg_1.17.24_armhf.deb (–unpack)”
Googling found solution here http://www.webupd8.org/2011/02/fix-dpkg-error-trying-to-overwrite-x.html
And was able to fix dependecies conflict by commands
dpkg -i --force-overwrite /var/cache/apt/archives/dpkg_1.17.24_armhf.deb
dpkg -i --force-all /var/cache/apt/archives/php5-apcu_4.0.7-1_armhf.deb
After I run again apt-get -f install and it succeed!
It asked to me resolve some php5.ini conflicts, so for PHP i overwritten it from update and for apache2 I kept original one
After I did reboot with command “reboot” I was able to login to dashboard!, only problem is that firmware version is now unavailable, during automative firmware update I am getting error get_firmware_info_500