1

I'm trying to install wine1.7 from official ppa,my OS is Ubuntu 14.04 64bit, however when I use the apt-getcommand to install wine, the output is:

The following packages have unmet dependencies:
wine1.7 : Depends: wine1.7-i386 (= 1:1.7.38-0ubuntu1)
E: Unable to correct problems, you have held broken packages.

how can I solve this ?

additinal information: wine1.6 can't be intalled too.It seems some packages I installed cause this problem, because I installed wine successfully before. A problem maybe related to this : when I use apt-get upgrade, there are messages:

The following packages have been kept back:
  linux-generic-lts-utopic linux-headers-generic-lts-utopic
  linux-image-generic-lts-utopic

I added the repositories

deb http://extras.ubuntu.com/ubuntu trusty main
deb-src http://extras.ubuntu.com/ubuntu trusty main

as someone suggested when I failed to install wine 1.7 (at that time wine1.6 is installed successfully), hope this helps.

sudo dpkg --add-architecture i386 doesn't work.

when I try to install wine with software-center,it says :

The following packages have unmet dependencies:
wine1.6: Depends: wine1.6-amd64 (= 1:1.6.2-0ubuntu4) but 1:1.6.2-0ubuntu4 is to be installed
Depends: wine1.6-i386 (= 1:1.6.2-0ubuntu4) but it is a virtual package.

I deleted the repositories mentioned above and removed those 3 packages been kept back, rebooted the computer. still doesn't work.

It's weird , how can apt-getsay you have held broken packages. while there are no broken packages at all ?

muru
  • 197,895
  • 55
  • 485
  • 740
  • Have you tried sudo purge wine and reinstalling ? – Aravinda May 04 '15 at 03:39
  • Actually wine is not installed in this system. It is clean, it's an reinstallation with an image which I used to install wine successfully . – social_loser May 04 '15 at 04:13
  • I add that information for there was an answer suggest me to add that architecture, I 've got that architecture added long ago but I still give it a try again ,still not work, I comment that following the answer, but soon the answerer deleted that answer totally. so I have to add it into the main article in case any one type them again. thank u guys all, my system is modified a lot by me. but what is already installed is necessary for me so I want to make it installed without to reinstall the system. – social_loser May 04 '15 at 04:50
  • @kos none of those answers work. However I 'm now using wine source code, it suggest that I need to install 32-bit development libraries. – social_loser May 04 '15 at 05:05
  • If you haven't solved it, try this: sudo apt-get install wine1.7-i386, just to see what happens. – TheWanderer May 04 '15 at 12:05
  • 2
    To close voters: answers in the duplicate seems not to work for OP – kos May 04 '15 at 13:58
  • What's the output of apt-cache policy wine1.7-i386? – David Foerster May 04 '15 at 18:30

2 Answers2

0

I actually had the same error as you did you try installing with aptitude. (i.e. sudo aptitude install wine1.7) I found I was missing the libgphoto2-port10 dependence and with a quick google search was able to get that installed going.

0

After seemingly trying everything else on 14.04 to get wine1.6 running, this worked:

Any wine packages installed and causing problems:

sudo dpkg -l | grep wine

Remove all wine- PPA sources listed in /etc/apt/sources.list.d/, e.g.

sudo rm /etc/apt/sources.list.d/ubuntu-wine-ppa-trusty.list
sudo rm /etc/apt/sources.list.d/wine-wine-builds-trusty.list

Make /etc/apt/sources.list support multiarch by adding [arch=amd64,i386] to the deb-line by editing:

sudo vi /etc/apt/sources.list

Here:

# deb cdrom:[Ubuntu 14.04.3 LTS _Trusty Tahr_ - Beta amd64 (20150805)]/ trusty main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ trusty main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb [arch=amd64,i386] http://us.archive.ubuntu.com/ubuntu/ trusty universe

Per this answer, Presumably that file, /etc/dpkg/dpkg.cfg.d/multiarch, contains a foreign-architecture key. So I suggest just deleting the file:

 sudo rm /etc/dpkg/dpkg.cfg.d/multiarch

Add the PPA again to retrieve wine and resolve dpkg recognizes i386:

 sudo add-apt-repository ppa:ubuntu-wine/ppa
 sudo dpkg --add-architecture i386
 sudo apt-get update

On to installing wine:

 sudo aptitude --full-resolver -f install wine1.6

Results in:

 ...
 The following actions will resolve these dependencies:

 Keep the following packages at their current version: 
 1) libgphoto2-6:i386 [Not Installed] 
 2) libgphoto2-port10:i386 [Not Installed] 
 ...
 15) wine1.6 [Not Installed] 
 16) wine1.6-amd64 [Not Installed] 
 17) wine1.6-i386:i386 [Not Installed] 

Leave the following dependencies unresolved: 
... 

Here r 15 will give us other solutions which still include installing wine1.6 (adjust based on your terminal output)

Accept this solution? [Y/n/q/?] r 15

Results in:

Keep the following packages at their current version: 
1) libgphoto2-6:i386 [Not Installed] 
2) libgphoto2-port10:i386 [Not Installed] 
...
15) R wine1.6 [Not Installed] 
16) wine1.6-amd64 [Not Installed] 
17) wine1.6-i386:i386 [Not Installed] 

Leave the following dependencies unresolved: 
... 

DO NOT ACCEPT THIS SOLUTION, as you want the option to downgrade.

Accept this solution? [Y/n/q/?] n
The following actions will resolve these dependencies:

Downgrade the following packages: 
1) libudev1 [204-0ubuntu19 (now) -> 204-0ubuntu18 (saucy)]
...

ACCEPT THIS SOLUTION

Accept this solution? [Y/n/q/?] Y
The following packages will be DOWNGRADED:
libudev1

The exact packages which needed to be downgraded on my build differed from those listed in the answer but performed exactly the same.

Joshua34
  • 101