actions / runner-images

GitHub Actions runner images
MIT License
9.22k stars 2.86k forks source link

[ubuntu-20.04] Unable to install wine32:i386 / issues with i386 arch support in apt #4589

Closed ethteck closed 2 years ago

ethteck commented 2 years ago

Description

We noticed in our project that somewhere in between 20211114.1 and 20211122.1, apt behavior changed when adding the i386 arch. We use this to install wine for running 32-bit processes. One of our tests is failing now because the version of wine installed is for 64-bit processes.

Additionally, you can see when you compare the two runs that the packages installed greatly differ despite being pretty much identical repo states (and identical runner scripts).

Virtual environments affected

Image version and build link

https://github.com/decompme/decomp.me/runs/4321547477

Is it regression?

20211114.1

Expected behavior

Apt installs :i386 versions of things so the correct wine is installed

Actual behavior

Apt is not installing these

Repro steps

Create an ubuntu-latest action that runs

sudo dpkg --add-architecture i386
sudo apt update
sudo apt install wine

And then attempt to execute a 32-bit windows executable

F4DE777 commented 1 year ago

~ $ sudo apt install -y wine32 Reading package lists... Done Building dependency tree... Done Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:

The following packages have unmet dependencies: grep : PreDepends: libpcre3 but it is not installable E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

vadz commented 1 year ago

FWIW the following workaround works for me for Ubuntu 22.04 right now (2022-09-28):

sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update -qq
sudo apt-get remove -qq libmono* moby* mono* nginx* php* libgdiplus libpcre2-posix3 libzip4

It might not be (and probably is not) minimal, but it allows the build to proceed which is all I want now.

F4DE777 commented 1 year ago

i got an error i have tried many methods to install it and i think i broke something

~ $ sudo apt-get remove -qq libmono moby mono nginx php* libgdiplus libpcre2-posix3 libzip4 E: Unable to locate package phpMyAdmin-latest-all-languages.tar.gz E: Couldn't find any package by glob 'phpMyAdmin-latest-all-languages.tar.gz' E: Couldn't find any package by regex 'phpMyAdmin-latest-all-languages.tar.gz' E: Unable to locate package phpMyAdmin-latest-all-languages.tar.gz.1 E: Couldn't find any package by glob 'phpMyAdmin-latest-all-languages.tar.gz.1' E: Couldn't find any package by regex 'phpMyAdmin-latest-all-languages.tar.gz.1' ~ $

Written with Compose.ai https://www.compose.ai/?utm_campaign=referral&utm_medium=signature&utm_source=d5dc56a3-6a51-4dd0-9cfe-86f28111bd9c

On Tue, 27 Sept 2022 at 23:58, VZ @.***> wrote:

FWIW the following workaround works for me for Ubuntu 22.04 right now (2022-09-28):

sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list sudo apt-get update -qq sudo apt-get remove -qq libmono moby mono nginx php* libgdiplus libpcre2-posix3 libzip4

It might not be (and probably is not) minimal, but it allows the build to proceed which is all I want now.

— Reply to this email directly, view it on GitHub https://github.com/actions/runner-images/issues/4589#issuecomment-1260157764, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASFHCHNZPPPFIDMA565MVB3WAN3ZNANCNFSM5IYKQI3Q . You are receiving this because you commented.Message ID: @.***>

kamil-kielczewski commented 1 year ago

In my case: docker witch node, java, angular and electron this works - I left full dockerfile

FROM node:16.15.0

WORKDIR /work
COPY package.json .

RUN apt update
RUN apt-get -y install zip unzip

# node_modules witch angular and electron
RUN npm install -g n @angular/cli electron electron-builder

# JAVA
RUN apt-get -y install default-jre
RUN apt install openjdk-11-jre-headless 

# Wine (Wine32)
RUN apt install -y software-properties-common
RUN dpkg --add-architecture i386
RUN wget -nc https://dl.winehq.org/wine-builds/winehq.key
RUN apt-key add winehq.key
RUN add-apt-repository 'deb https://dl.winehq.org/wine-builds/debian/ buster main'
RUN apt update
RUN apt -y install --install-recommends winehq-stable

EXPOSE 3002
xanimo commented 1 year ago

Why is this issue closed? It was not solved and workarounds submitted by other users should not count as sufficient support for something we have to pay for...

ValdikSS commented 1 year ago

Current working solution for ubuntu-20.04 is:

sudo dpkg --add-architecture i386
sudo dpkg -l | awk '/ii  lib.*deb.sury.org/ {gsub(/:.*/, s, $2); print $2}' | xargs apt show -a | awk '/Package:/ {p=$2} /APT-Sources: .*focal\/main/ {print p"/focal"}' | sudo xargs eatmydata apt install --allow-downgrades
sudo apt update
sudo DEBIAN_FRONTEND=noninteractive eatmydata apt install -y --no-install-recommends wine-stable wine32

Saves 2 minutes compared to @burner1024 action.

salil-mehta commented 1 year ago

maverick@vault:/opt$ sudo apt install -y wine32 Reading package lists... Done Building dependency tree
Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:

The following packages have unmet dependencies. wine32:i386 : Depends: libc6:i386 (>= 2.28) but it is not going to be installed Depends: libwine:i386 (= 5.0-3ubuntu1) but it is not going to be installed E: Unable to correct problems, you have held broken packages. maverick@vault:/opt$ maverick@vault:/opt$ uname -a Linux vault 5.4.0-77-generic #86-Ubuntu SMP Thu Jun 17 02:35:03 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux maverick@vault:/opt$ lsb_release -a LSB Version: core-11.1.0ubuntu2-noarch:printing-11.1.0ubuntu2-noarch:security-11.1.0ubuntu2-noarch Distributor ID: Ubuntu Description: Ubuntu 20.04.2 LTS Release: 20.04 Codename: focal maverick@vault:/opt$

Facing similar issues. Not sure where did break the system and during which upgrade. can't install wine32:i386. I am really tired trying different suggestions. None of them have worked till now. Pheww...

gearcoded commented 1 year ago

This worked for me to remove the PPA PHP packages and downgrade the conflicting dependencies:

sudo apt-add-repository -y ppa:ondrej/php
sudo apt-get install ppa-purge
sudo ppa-purge -y ppa:ondrej/php

Thanks a lot! After this, I was able to install both wine64 and wine32 from winehq. Now, I need to figure out how to install different php versions system wide.

hajimehoshi commented 1 year ago

I found a very similar issue with Ubuntu 22.

sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install gcc-multilib
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libc6:i386 : Depends: libgcc-s1:i386 but it is not going to be installed
 libegl-mesa0:i386 : Depends: libgcc-s1:i386 (>= 4.2) but it is not going to be installed
 libgl1-mesa-dri:i386 : Depends: libgcc-s1:i386 (>= 7) but it is not going to be installed
                        Depends: libstdc++6:i386 (>= 11) but it is not going to be installed
                        Recommends: libgl1-amber-dri:i386 but it is not installable
 libicu70:i386 : Depends: libgcc-s1:i386 (>= 7) but it is not going to be installed
                 Depends: libstdc++6:i386 (>= 5.2) but it is not going to be installed
 libllvm15:i386 : Depends: libatomic1:i386 (>= 4.8) but it is not going to be installed
                  Depends: libgcc-s1:i386 (>= 4.2) but it is not going to be installed
                  Depends: libstdc++6:i386 (>= 12) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Actual case: https://github.com/hajimehoshi/ebiten/actions/runs/4968180811/jobs/8892927506

This is weird since the above code worked without this error last week. What is the workaround for Ubuntu 22?

falkTX commented 1 year ago

GitHub updated the images and our old workarounds no longer work. My builds started failing without any changes on the CI workflow or code to build.

gruve-p commented 1 year ago

Same issue here, All work arounds are no longer working.

Current workaround: sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list sudo apt-get update -qq sudo apt-get remove -qq libmono moby mono nginx php* libgdiplus libpcre2-posix3 libzip4

Current error:

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libc6:i386 : Depends: libgcc-s1:i386 but it is not going to be installed
 libicu70:i386 : Depends: libgcc-s1:i386 (>= 7) but it is not going to be installed
                 Depends: libstdc++6:i386 (>= 5.2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Github action: https://github.com/Groestlcoin/groestlcoin/actions/runs/4972958919/jobs/8898488039

ethteck commented 1 year ago

yep, I can confirm this problem has re-emerged for us as well. :(

mboudreau commented 1 year ago

I'm getting the same issues, has anyone figured out a workaround? Thanks.

ValdikSS commented 1 year ago

Current working solution for ubuntu-20.04 is:

sudo dpkg --add-architecture i386
sudo dpkg -l | awk '/ii  lib.*deb.sury.org/ {gsub(/:.*/, s, $2); print $2}' | xargs apt show -a | awk '/Package:/ {p=$2} /APT-Sources: .*focal\/main/ {print p"/focal"}' | sudo xargs eatmydata apt install --allow-downgrades
sudo apt update
sudo DEBIAN_FRONTEND=noninteractive eatmydata apt install -y --no-install-recommends wine-stable wine32

Saves 2 minutes compared to @burner1024 action.

My method still works, @mboudreau.

mboudreau commented 1 year ago

@ValdikSS Any solutions for ubuntu 22.04?

ValdikSS commented 1 year ago

@ValdikSS Any solutions for ubuntu 22.04?

Try this:

sudo eatmydata apt-get install ppa-purge
sudo eatmydata ppa-purge -y ppa:ubuntu-toolchain-r/test

sudo dpkg --add-architecture i386
sudo apt update
sudo DEBIAN_FRONTEND=noninteractive eatmydata apt install -y --no-install-recommends wine-stable wine32
mboudreau commented 1 year ago

That didn't fully work for me @ValdikSS (thanks btw), but the ppa-purge did fix many issues: wine did install, but I was still getting some issues while building (lack of dependencies and mono install).

These steps worked for me:

- run: sudo apt-get install ppa-purge && sudo ppa-purge -y ppa:ubuntu-toolchain-r/test
# Install Wine
- run: sudo dpkg --add-architecture i386
- run: sudo mkdir -pm755 /etc/apt/keyrings && sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
- run: sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/winehq-jammy.sources
- run: sudo apt-get update
- run: sudo apt install --install-recommends winehq-stable
# Install mono
- run: sudo mkdir -p /opt/wine/mono && sudo wget "https://dl.winehq.org/wine/wine-mono/8.0.0/wine-mono-8.0.0-x86.tar.xz" -P /opt/wine/mono && sudo tar -xf /opt/wine/mono/wine-mono-8.0.0-x86.tar.xz -C /opt/wine/mono && sudo rm /opt/wine/mono/wine-mono-8.0.0-x86.tar.xz
falkTX commented 1 year ago

I was able to get things working with this:

sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo dpkg --add-architecture i386
sudo apt-get update -qq
sudo apt-get install -yqq --allow-downgrades binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64 libc6:i386 libgcc-s1:i386 libstdc++6:i386 mingw-w64 wine-stable

That installs both mingw and wine, handy for cross-compilation The trick is to use --allow-downgrades in combination with the basic libs libc6:i386 libgcc-s1:i386 libstdc++6:i386, then add the other stuff you need on the same line.

ethteck commented 1 year ago

Thanks @falkTX - for us, we don't need mingw, so I was able to remove the binutils / mingw stuff, and the solution became quite concise compared to what we were doing before. I also used wine instead of wine-stable - not sure if that makes any real difference other than maybe just which version is installed.

sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo dpkg --add-architecture i386
sudo apt-get update -qq
sudo apt-get install -yqq --allow-downgrades libc6:i386 libgcc-s1:i386 libstdc++6:i386 wine

Stay tuned for next time when things inevitably break out from under us again! 📺

MdJeweleIslam commented 11 months ago
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install wine32

Its working for me.

Xses-1 commented 3 weeks ago

I am getting something similar still:

# sudo apt install wine32
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Starting pkgProblemResolver with broken count: 1
Starting 2 pkgProblemResolver with broken count: 1
Investigating (0) libfaudio0:i386 < none -> 22.02-1 @un puN Ib >
Broken libfaudio0:i386 Depends on libsdl2-2.0-0:i386 < none | 2.0.20+dfsg-2ubuntu1.22.04.1 @un uH > (>= 2.0.16)
  Considering libsdl2-2.0-0:i386 0 as a solution to libfaudio0:i386 0
  Considering libsdl2-2.0-0:i386 0 as a solution to libfaudio0:i386 0
Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libfaudio0:i386 : Depends: libsdl2-2.0-0:i386 (>= 2.0.16) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Xses-1 commented 3 weeks ago

When I run sudo apt install libsdl2-2.0-0:i386 it throws a lot of nonsense (I am on KDE Neon):

The following packages have unmet dependencies:
 libsdl2-2.0-0:i386 : Depends: libdecor-0-0:i386 (>= 0.1.0) but it is not going to be installed
 neon-desktop : Depends: kaccounts-providers but it is not going to be installed
                Depends: kinfocenter but it is not going to be installed
                Depends: kio-extras but it is not going to be installed
                Depends: kwin-wayland but it is not going to be installed
                Depends: kwin-x11 but it is not going to be installed
                Depends: powerdevil but it is not going to be installed
                Depends: sddm-theme-breeze
                Recommends: dolphin but it is not going to be installed
                Recommends: dolphin-plugins but it is not going to be installed
                Recommends: gwenview but it is not going to be installed
                Recommends: kde-spectacle but it is not going to be installed
                Recommends: kdeconnect but it is not going to be installed
                Recommends: kdeplasma-addons but it is not going to be installed
                Recommends: kdialog but it is not going to be installed
                Recommends: kio-gdrive but it is not going to be installed
                Recommends: kio-gdrive-5 but it is not going to be installed
                Recommends: konsole but it is not going to be installed
                Recommends: kscreen but it is not going to be installed
                Recommends: kwrite but it is not going to be installed
                Recommends: okular but it is not going to be installed
                Recommends: plasma-browser-integration but it is not going to be installed
                Recommends: plasma-nm but it is not going to be installed
                Recommends: plasma-systemmonitor but it is not going to be installed
                Recommends: plasma-workspace-wayland
                Recommends: snapd but it is not going to be installed
                Recommends: vim
 plasma-desktop : Depends: plasma-workspace (>= 4:6.0.4) but it is not going to be installed
                  Depends: libsdl2-2.0-0 (>= 2.28.5+dfsg) but it is not installable
                  Recommends: kde-style-oxygen-qt6 but it is not installable
                  Recommends: kinfocenter but it is not going to be installed
                  Recommends: kio-extras but it is not going to be installed
                  Recommends: kscreen but it is not going to be installed
                  Recommends: kwin-wayland but it is not going to be installed or
                              kwin-x11 but it is not going to be installed
                  Recommends: powerdevil but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.