Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

When I try to install wine through terminal, it throws the error:

nits@nits-desktop:~$ sudo apt-get install wine
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 wine : Depends: wine1.6 but it is not going to be installed
 wine1.6-i386 : Depends: wine1.6 (= 1.6~rc2-0ubuntu1~ppa1) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Then trying to fix broken packages it shows:

nits@nits-desktop:~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  wine1.6
Suggested packages:
  dosbox
The following NEW packages will be installed:
  wine1.6
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 0 B/1,160 kB of archives.
After this operation, 3,047 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
(Reading database ... 301229 files and directories currently installed.)
Unpacking wine1.6 (from .../wine1.6_1.6~rc2-0ubuntu1~ppa1_i386.deb) ...
dpkg: error processing /var/cache/apt/archives/wine1.6_1.6~rc2-0ubuntu1~ppa1_i386.deb (--unpack):
 trying to overwrite '/usr/bin/wine', which is also in package wine1.6-i386 1.6~rc2-0ubuntu1~ppa1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Processing triggers for man-db ...
Processing triggers for hicolor-icon-theme ...
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf.index...
Processing triggers for desktop-file-utils ...
Processing triggers for gnome-menus ...
Errors were encountered while processing:
 /var/cache/apt/archives/wine1.6_1.6~rc2-0ubuntu1~ppa1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I am also not able to remove broken packages. What to do? I have tried many solutions available on this topic but none of them is working. Winetricks is installed, it wouldn't work without Wine

share|improve this question

2 Answers 2

up vote 1 down vote accepted

sudo apt-get -o Dpkg::Options::="--force-overwrite" -f install wine1.6

All credit goes to this users post on Ubuntu Forums.

share|improve this answer
    
I could not overwrite the file using dpkg. So I tried deleting the file that causing problem. It did the task. Thanks. –  nitish sershiya Jun 17 '13 at 13:35

I found the solution. First i had to delete the broken package using:

sudo rm /var/cache/apt/archives/wine1.6_1.6~rc2-0ubuntu1~ppa1_i386.deb

Then tried to repair the broken packages again:

sudo apt-get -f install

Thank you everyone because my problem was solved by combining some solutions here.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.