I get an error when I typed;
sudo apt upgrade
The error is;
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-dev : Depends: python3-distutils (>= 3.10.6-1~) but 3.10.4-0ubuntu1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
If I try to type;
sudo apt --fix-broken install
The issue didn't solved and I get same error.
"apt policy python3-distutils" report is below;
python3-distutils:
Installed: 3.10.4-0ubuntu1
Candidate: 3.10.6-1~22.04
Version table:
3.10.6-1~22.04 500
500 http://tr.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
500 http://tr.archive.ubuntu.com/ubuntu jammy-updates/main i386 Packages
*** 3.10.4-0ubuntu1 500
500 http://tr.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
500 http://tr.archive.ubuntu.com/ubuntu jammy/main i386 Packages
100 /var/lib/dpkg/status
"sudo apt --fix-broken install" also gave error such below;
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
python3-distutils python3-lib2to3
The following packages will be upgraded:
python3-distutils python3-lib2to3
2 upgraded, 0 newly installed, 0 to remove and 25 not upgraded.
9 not fully installed or removed.
Need to get 0 B/216 kB of archives.
After this operation, 105 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 319749 files and directories currently installed.)
Preparing to unpack .../python3-distutils_3.10.6-1~22.04_all.deb ...
Unpacking python3-distutils (3.10.6-1~22.04) over (3.10.4-0ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/python3-distutils_3.10.6-
1~22.04_all.deb (--unpack):
trying to overwrite '/usr/lib/python3.11/distutils/README', which is also in pa
ckage python3.11-distutils 3.11.0~rc2-1+jammy1
Preparing to unpack .../python3-lib2to3_3.10.6-1~22.04_all.deb ...
Unpacking python3-lib2to3 (3.10.6-1~22.04) over (3.10.4-0ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/python3-lib2to3_3.10.6-1~
22.04_all.deb (--unpack):
trying to overwrite '/usr/lib/python3.11/lib2to3/Grammar.txt', which is also in
package python3.11-lib2to3 3.11.0~rc2-1+jammy1
Errors were encountered while processing:
/var/cache/apt/archives/python3-distutils_3.10.6-1~22.04_all.deb
/var/cache/apt/archives/python3-lib2to3_3.10.6-1~22.04_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
sudo apt updatefirst and then runsudo apt upgradeagain.apt policy python3-distutilsvia edit to your question.python3-distutilsis availabe, sosudo apt --fix-broken installshould be able to solve the dependency problem now. Please try again.