Cannot Resolve Package Dependencies on Ubuntu 12.04 – Solution

12.04dependencies

Ive fresh installed ubuntu 12.04 and wanted to look for updates.
An error occurred and asked if i want to repair dependencies. So I did what it asked for but it failed again and again and again.
Same thing happens when i want to install software from repositories "sudo apt-get install …".
Ive read that it can be solved by installing missing dependencies by "sudo apt-get install -f". But it failed with error again:

Errors were encountered while processing:
 /var/cache/apt/archives/libqtcore4_4%3a4.8.1-0ubuntu4_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Any suggestions what to do?

sudo dpkg --configure -a

gave me:

Errors were encountered while processing:
 libqtgui4:i386
 libqt4-sql:i386
 ia32-libs-multiarch:i386
 libqt4-declarative:i386
 libqt4-svg:i386
 libqt4-network:i386
 libqt4-sql-mysql:i386
 libqt4-script:i386
 libqt4-dbus:i386
 ia32-libs
 libqt4-opengl:i386
 libqtwebkit4:i386
 libqt4-designer:i386
 libqt4-scripttools:i386
 libqt4-qt3support:i386
 libqt4-xml:i386
 libqt4-test:i386
 libqt4-xmlpatterns:i386

Ive done:

sudo apt-get clean
sudo apt-get autoclean
sudo apt-get install -f

still getting this error:

Errors were encountered while processing:
 /var/cache/apt/archives/libqtcore4_4%3a4.8.1-0ubuntu4_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Best Answer

Clean your cache and redownload the packages sudo apt-get clean sudo apt-get autoclean, then try with sudo apt-get install -f , I've been getting these errors too.

Related Question