pop-os / upgrade

Utility for upgrading Pop!_OS and its recovery partition to new releases.
GNU General Public License v3.0
95 stars 29 forks source link

Dependency issues after attempting upgrade with PipeWire PPA #301

Open dmarx opened 2 years ago

dmarx commented 2 years ago

Upgrade to 22.04 failed with message (FYI: this text can't currently be copy/pasted, had to screenshot it):

Screenshot from 2022-06-16 10-41-26

hoped to deal with this later, but apparently the failed upgrade process removed ffmpeg (which I need for work) and now I can't reinstall it. All attempts to repair the upgrade, install ffmpeg, or remove broken packages with apt result in some variant of "unmet dependencies" messages implicating gstreamer/pipewire as the core of the problem.

$ sudo apt full-upgrade

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 gstreamer1.0-pipewire : Depends: pipewire (= 0.3.52.r2.g9255cfb-1~ubuntu21.10) but 0.3.32-1 is installed
                         Depends: libpipewire-0.3-0 (= 0.3.52.r2.g9255cfb-1~ubuntu21.10) but 0.3.32-1 is installed
 pipewire-audio-client-libraries : Depends: pipewire (= 0.3.52.r2.g9255cfb-1~ubuntu21.10) but 0.3.32-1 is installed
                                   Depends: libpipewire-0.3-0 (= 0.3.52.r2.g9255cfb-1~ubuntu21.10) but 0.3.32-1 is installed
 pipewire-media-session : Depends: pipewire (>= 0.3.39) but 0.3.32-1 is installed
                          Depends: libpipewire-0.3-0 (>= 0.3.39) but 0.3.32-1 is installed
                          Breaks: pipewire-pulse (< 0.3.39-1)
                          Breaks: pipewire-pulse:i386 (< 0.3.39-1)
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

$ sudo apt clean
$ sudo apt update -m

Hit:1 http://apt.pop-os.org/proprietary impish InRelease
Hit:2 http://apt.pop-os.org/release impish InRelease
Hit:3 http://us.archive.ubuntu.com/ubuntu impish InRelease
Hit:4 http://us.archive.ubuntu.com/ubuntu impish-security InRelease
Hit:5 http://us.archive.ubuntu.com/ubuntu impish-updates InRelease
Get:6 http://us.archive.ubuntu.com/ubuntu impish-backports InRelease [101 kB]
Fetched 101 kB in 1s (110 kB/s)    
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.

$ sudo dpkg --configure -a

Setting up x11proto-dev (2020.1-1) ...
Setting up libx11-dev:amd64 (2:1.7.2-1) ...
Setting up libspa-0.2-jack:amd64 (0.3.32-1) ...
Setting up libopenaptx0:amd64 (0.2.0-5) ...
Setting up libspa-0.2-bluetooth:amd64 (0.3.32-1) ...
Setting up libx11-6:i386 (2:1.7.2-1) ...
dpkg: dependency problems prevent configuration of pipewire-pulse:
 pipewire-media-session (0.4.1.r10.gf715063-2~ubuntu21.10) breaks pipewire-pulse (<< 0.3.39-1) and is installed.
  Version of pipewire-pulse to be configured is 0.3.32-1.

dpkg: error processing package pipewire-pulse (--configure):
 dependency problems - leaving unconfigured
Setting up libx11-xcb1:i386 (2:1.7.2-1) ...
Processing triggers for man-db (2.9.4-2) ...
Processing triggers for libc-bin (2.34-0ubuntu3.2) ...
Errors were encountered while processing:
 pipewire-pulse

$ sudo apt remove pipewire-media-session

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 gstreamer1.0-pipewire : Depends: pipewire (= 0.3.52.r2.g9255cfb-1~ubuntu21.10) but 0.3.32-1 is to be installed
                         Depends: libpipewire-0.3-0 (= 0.3.52.r2.g9255cfb-1~ubuntu21.10) but 0.3.32-1 is to be installed
 pipewire-audio-client-libraries : Depends: pipewire (= 0.3.52.r2.g9255cfb-1~ubuntu21.10) but 0.3.32-1 is to be installed
                                   Depends: libpipewire-0.3-0 (= 0.3.52.r2.g9255cfb-1~ubuntu21.10) but 0.3.32-1 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

$ sudo apt remove gstreamer1.0-pipewire

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 gnome-shell : Depends: gstreamer1.0-pipewire (>= 0.3.10) but it is not going to be installed
 pipewire-audio-client-libraries : Depends: pipewire (= 0.3.52.r2.g9255cfb-1~ubuntu21.10) but 0.3.32-1 is to be installed
                                   Depends: libpipewire-0.3-0 (= 0.3.52.r2.g9255cfb-1~ubuntu21.10) but 0.3.32-1 is to be installed
 pipewire-media-session : Depends: pipewire (>= 0.3.39) but 0.3.32-1 is to be installed
                          Depends: libpipewire-0.3-0 (>= 0.3.39) but 0.3.32-1 is to be installed
                          Breaks: pipewire-pulse (< 0.3.39-1)
                          Breaks: pipewire-pulse:i386 (< 0.3.39-1)
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

$ sudo apt install -f

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
 gstreamer1.0-pipewire : Depends: pipewire (= 0.3.52.r2.g9255cfb-1~ubuntu21.10) but 0.3.32-1 is installed
                         Depends: libpipewire-0.3-0 (= 0.3.52.r2.g9255cfb-1~ubuntu21.10) but 0.3.32-1 is installed
 pipewire-audio-client-libraries : Depends: pipewire (= 0.3.52.r2.g9255cfb-1~ubuntu21.10) but 0.3.32-1 is installed
                                   Depends: libpipewire-0.3-0 (= 0.3.52.r2.g9255cfb-1~ubuntu21.10) but 0.3.32-1 is installed
 pipewire-media-session : Depends: pipewire (>= 0.3.39) but 0.3.32-1 is installed
                          Depends: libpipewire-0.3-0 (>= 0.3.39) but 0.3.32-1 is installed
                          Breaks: pipewire-pulse (< 0.3.39-1)
                          Breaks: pipewire-pulse:i386 (< 0.3.39-1)
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies

$ sudo apt dist-upgrade

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 gstreamer1.0-pipewire : Depends: pipewire (= 0.3.52.r2.g9255cfb-1~ubuntu21.10) but 0.3.32-1 is installed
                         Depends: libpipewire-0.3-0 (= 0.3.52.r2.g9255cfb-1~ubuntu21.10) but 0.3.32-1 is installed
 pipewire-audio-client-libraries : Depends: pipewire (= 0.3.52.r2.g9255cfb-1~ubuntu21.10) but 0.3.32-1 is installed
                                   Depends: libpipewire-0.3-0 (= 0.3.52.r2.g9255cfb-1~ubuntu21.10) but 0.3.32-1 is installed
 pipewire-media-session : Depends: pipewire (>= 0.3.39) but 0.3.32-1 is installed
                          Depends: libpipewire-0.3-0 (>= 0.3.39) but 0.3.32-1 is installed
                          Breaks: pipewire-pulse (< 0.3.39-1)
                          Breaks: pipewire-pulse:i386 (< 0.3.39-1)
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

$ sudo apt autoremove --purge

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 gstreamer1.0-pipewire : Depends: pipewire (= 0.3.52.r2.g9255cfb-1~ubuntu21.10) but 0.3.32-1 is installed
                         Depends: libpipewire-0.3-0 (= 0.3.52.r2.g9255cfb-1~ubuntu21.10) but 0.3.32-1 is installed
 pipewire-audio-client-libraries : Depends: pipewire (= 0.3.52.r2.g9255cfb-1~ubuntu21.10) but 0.3.32-1 is installed
                                   Depends: libpipewire-0.3-0 (= 0.3.52.r2.g9255cfb-1~ubuntu21.10) but 0.3.32-1 is installed
 pipewire-media-session : Depends: pipewire (>= 0.3.39) but 0.3.32-1 is installed
                          Depends: libpipewire-0.3-0 (>= 0.3.39) but 0.3.32-1 is installed
                          Breaks: pipewire-pulse (< 0.3.39-1)
                          Breaks: pipewire-pulse:i386 (< 0.3.39-1)
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

$ sudo apt install --reinstall pipewire

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 gstreamer1.0-pipewire : Depends: pipewire (= 0.3.52.r2.g9255cfb-1~ubuntu21.10) but 0.3.32-1 is to be installed
                         Depends: libpipewire-0.3-0 (= 0.3.52.r2.g9255cfb-1~ubuntu21.10) but 0.3.32-1 is to be installed
 pipewire-audio-client-libraries : Depends: pipewire (= 0.3.52.r2.g9255cfb-1~ubuntu21.10) but 0.3.32-1 is to be installed
                                   Depends: libpipewire-0.3-0 (= 0.3.52.r2.g9255cfb-1~ubuntu21.10) but 0.3.32-1 is to be installed
 pipewire-media-session : Depends: pipewire (>= 0.3.39) but 0.3.32-1 is to be installed
                          Depends: libpipewire-0.3-0 (>= 0.3.39) but 0.3.32-1 is to be installed
                          Breaks: pipewire-pulse (< 0.3.39-1)
                          Breaks: pipewire-pulse:i386 (< 0.3.39-1)
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

$ cat /etc/os-release

NAME="Pop!_OS"
VERSION="21.10"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 21.10"
VERSION_ID="21.10"
HOME_URL="https://pop.system76.com"
SUPPORT_URL="https://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=impish
UBUNTU_CODENAME=impish
LOGO=distributor-logo-pop-os

$ apt policy pipewire libpipewire pipewire-pule pipewire-media-session pipewire-
audio-client-libraries gstreamer1.0-pipwire

pipewire:
  Installed: 0.3.32-1
  Candidate: 0.3.32-1
  Version table:
 *** 0.3.32-1 500
        500 http://us.archive.ubuntu.com/ubuntu impish/main amd64 Packages
        100 /var/lib/dpkg/status
pipewire-media-session:
  Installed: 0.4.1.r10.gf715063-2~ubuntu21.10
  Candidate: 0.4.1.r10.gf715063-2~ubuntu21.10
  Version table:
 *** 0.4.1.r10.gf715063-2~ubuntu21.10 100
        100 /var/lib/dpkg/status
     0.3.32-1 500
        500 http://us.archive.ubuntu.com/ubuntu impish/main amd64 Packages
pipewire-audio-client-libraries:
  Installed: 0.3.52.r2.g9255cfb-1~ubuntu21.10
  Candidate: 0.3.52.r2.g9255cfb-1~ubuntu21.10
  Version table:
 *** 0.3.52.r2.g9255cfb-1~ubuntu21.10 100
        100 /var/lib/dpkg/status
     0.3.32-1 500
        500 http://us.archive.ubuntu.com/ubuntu impish/universe amd64 Packages
N: Unable to locate package libpipewire
N: Unable to locate package pipewire-pule
N: Unable to locate package gstreamer1.0-pipwire
N: Couldn't find any package by glob 'gstreamer1.0-pipwire'
jacobgkau commented 2 years ago

gstreamer1.0-pipewire : Depends: pipewire (= 0.3.52.r2.g9255cfb-1~ubuntu21.10) but 0.3.32-1 is installed

https://packages.ubuntu.com/impish/pipewire shows that 21.10 should have had Pipewire 0.3.32-1, with Ubuntu 22.04 having 0.3.48-1ubuntu1 and Pop!_OS 22.04 having 0.3.52-1pop1~1654797379~22.04~457334a. I'm not sure where the 0.3.52.r2.g9255cfb-1~ubuntu21.10 being referred to comes from.

It looks like that version number is used in this PPA: https://launchpad.net/~pipewire-debian/+archive/ubuntu/pipewire-upstream Were you using upstream Pipewire from that PPA or another?

jacobgkau commented 2 years ago

I am able to recreate this on a fresh 21.10 install by adding the above PPA, installing all updates (requires full-upgrade), and then attempting to run the upgrade:

sudo add-apt-repository ppa:pipewire-debian/pipewire-upstream
sudo apt update
sudo apt full-upgrade
pop-upgrade release upgrade

On the command line, I get Release upgrade status: Release upgrade aborted: Failed to downgrade packages. sudo apt update then reports no updates available, but sudo apt upgrade shows unmet dependencies.

dmarx commented 2 years ago

Were you using upstream Pipewire from that PPA or another?

Not sure, but entirely possible. I vaguely remember doing something funny with pipewire installation to get ffmpeg working to begin with. Let me know if this helps or what I could run to get any other information you need

$ ls /etc/apt/sources.list.d

1password.list                                             pop-os-release.sources
1password.list.save                                        pop-os-release.sources.save
docker.list                                                slack.list
docker.list.save                                           slack.list.save
nvidia-container-runtime.list                              system.sources
nvidia-container-runtime.list.save                         system.sources.save
nvidia-docker.list                                         teams.list
nvidia-docker.list.save                                    teams.list.save
pipewire-debian-ubuntu-pipewire-upstream-impish.list       ubuntu-toolchain-r-ubuntu-test-impish.list
pipewire-debian-ubuntu-pipewire-upstream-impish.list.save  ubuntu-toolchain-r-ubuntu-test-impish.list.save
pop-os-apps.sources                                        vscode.list
pop-os-apps.sources.save                                   vscode.list.save

$ cat /etc/apt/sources.list.d/pipewire-debian-ubuntu-pipewire-upstream-impish.list

# deb http://ppa.launchpad.net/pipewire-debian/pipewire-upstream/ubuntu/ impish main
# deb-src http://ppa.launchpad.net/pipewire-debian/pipewire-upstream/ubuntu/ impish main
jacobgkau commented 2 years ago

pipewire-debian-ubuntu-pipewire-upstream-impish.list

Yes, this is a non-default third-party PPA that you added. That is what caused the issue.

pop-upgrade obviously shouldn't fail due to that, it should know how to remove it. I'm testing a quick potential solution myself, otherwise this may need further engineering work to fix. In the meantime, my testing suggests you should be able to unblock your machine's package manager with this command:

sudo apt install gstreamer1.0-pipewire=0.3.32-1 pipewire-media-session=0.3.32-1 pipewire-audio-client-libraries=0.3.32-1

(Those version numbers were found with apt policy ___ for each package and looking at the available version numbers from Ubuntu for each one.) After that, run pop-upgrade release upgrade or try from the GUI again, and it should not fail in the same place.

On 22.04, PipeWire is provided by Pop!_OS instead of Ubuntu, so you shouldn't need to replace it with a PPA's version (if you have any problems with it, they can be reported at https://github.com/pop-os/pipewire for 22.04-- ffmpeg is working fine on 22.04, but then it should have worked fine out-of-the-box on 21.10 too, so I'm not sure what issue you had previously run into.)

jacobgkau commented 2 years ago

To try and fix this, I first tried adding pipewire-media-session to the conflicting packages list. That didn't work because the error is occurring during downgrade_packages, which runs before remove_conflicting_packages. Interestingly, I can recreate the issue by running the apt-get --allow-downgrades -y install package1=... command that downgrade_packages uses manually, but if I run the same command a second time, it finishes and leaves the package manager in a good state. So two potential solutions might be running downgrade_packages twice, or making remove_conflicting_packages happen before downgrade_packages (and adding the necessary packages to remove_conflicting_packages, although I'm not sure either of those are the best solutions.

dmarx commented 2 years ago

sudo apt install gstreamer1.0-pipewire=0.3.32-1 pipewire-media-session=0.3.32-1 pipewire-audio-client-libraries=0.3.32-1

this worked to unblock me (i.e. I have ffmpeg again), thanks!

veryspry commented 2 years ago

pipewire-debian-ubuntu-pipewire-upstream-impish.list

Yes, this is a non-default third-party PPA that you added. That is what caused the issue.

pop-upgrade obviously shouldn't fail due to that, it should know how to remove it. I'm testing a quick potential solution myself, otherwise this may need further engineering work to fix. In the meantime, my testing suggests you should be able to unblock your machine's package manager with this command:

sudo apt install gstreamer1.0-pipewire=0.3.32-1 pipewire-media-session=0.3.32-1 pipewire-audio-client-libraries=0.3.32-1

(Those version numbers were found with apt policy ___ for each package and looking at the available version numbers from Ubuntu for each one.) After that, run pop-upgrade release upgrade or try from the GUI again, and it should not fail in the same place.

On 22.04, PipeWire is provided by Pop!_OS instead of Ubuntu, so you shouldn't need to replace it with a PPA's version (if you have any problems with it, they can be reported at https://github.com/pop-os/pipewire for 22.04-- ffmpeg is working fine on 22.04, but then it should have worked fine out-of-the-box on 21.10 too, so I'm not sure what issue you had previously run into.)

FWIW, I had this exact same issue when upgrading to 22.04 (don't judge me for waiting so long :joy:) and this unblocked me as well :raised_hands: