0

I attempted to update via the Software Update. Received error message of 'package operation failed'. So I attempted to run it in the terminal. Below is what I received in response. I have attempted other fixes that I found in this forum (including changing the server from the United States to the main server, running autoclean and autoremove commands, and restarting my computer). I tried the suggestion from this post libpcre2-dev : Depends: libpcre2-posix3 (= 10.39-3+ubuntu18.04.1+deb.sury.org+1) but it is not installed but it did not work.

I am still fairly new to Ubuntu/Linux, so excuse my ignorance. Thank you.

alexander@a-laptop:~$ sudo apt upgrade
[sudo] password for alexander: 
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:
 python3.13 : Depends: libpython3.13-stdlib (= 3.13.1-1+noble1) but 3.13.0-1+noble1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
alexander@a-laptop:~$ apt --fix-broken install
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
alexander@a-laptop:~$ sudo apt --fix broken install
E: Command line option --fix is not understood in combination with the other options
alexander@a-laptop:~$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  libpython3.13-minimal python3.13-minimal
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libpython3.13-stdlib
The following packages will be upgraded:
  libpython3.13-stdlib
1 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
1 not fully installed or removed.
Need to get 0 B/2,879 kB of archives.
After this operation, 5,458 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y        
(Reading database ... 299492 files and directories currently installed.)
Preparing to unpack .../libpython3.13-stdlib_3.13.1-1+noble1_amd64.deb ...
Unpacking libpython3.13-stdlib:amd64 (3.13.1-1+noble1) over (3.13.0-1+noble1) ...
dpkg: error processing archive /var/cache/apt/archives/libpython3.13-stdlib_3.13.1-1+noble1_amd64.deb (--unpack):
 trying to overwrite '/etc/python3.13/sitecustomize.py', which is also in package libpython3.13-minimal:amd64 3.1
3.0-1+noble1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/libpython3.13-stdlib_3.13.1-1+noble1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
alexander@a-laptop:~$ sudo apt autoremove
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:
 python3.13 : Depends: libpython3.13-stdlib (= 3.13.1-1+noble1) but 3.13.0-1+noble1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

2 Answers2

2

Should you have the third party deadsnakes ppa repository installed, it is likely causing this conflict.

Remove the deadsnakes ppa repository, run add-apt-repository command with the -r (remove) flag:

sudo add-apt-repository -r ppa:deadsnakes/ppa

Allow apt to make the required fixes

sudo apt --fix-broken install

Re-run apt upgrade, e.g.

sudo apt update -y && sudo apt upgrade
Gary
  • 21
1

I was able to solve the issue.

The issue was I had the 'deadsnakes' repository installed. So I disabled it and re-ran the command 'sudo apt --fix-broken install'.

This fixed the issue and I was able to update using the Software Updater.

Thank you all for your help!