When we installing some packages in ubuntu we may get some errors in terminal like below ,
trying to overwrite '/usr/bin/opencv_haartraining', which is also in package
libopencv2.3-bin 2.3.1+svn6514+branch23-12~oneiric
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/libcv-dev_2.1.0-7build1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
That time we have to fix the broken packages by following commands , after surfing some websites I got good solution and its perfectly working..sudo apt-get update --fix-missing
sudo dpkg --configure -a
sudo apt-get install -f
the problem of a broken package still exist the solution is to edit the dpkg status file manually .
sudo gedit /var/lib/dpkg/status
Locate the corrupt package, and remove the whole block of information about it and save the file.