Hay everyone
I am running Ubuntu 20 and I am facing some problems with 'apt'. I have been unable to fix the following error from apt after a wring installation of the Robotic Operating Systems
sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run apt
--fix-broken install' to correct these.
The following packages have unmet dependencies:
python2 : PreDepends: python2-minimal (= 2.7.17-2ubuntu4) but 2.7.18-3 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
I understand that I should install the version of python 2.7 but even when I run the suggested command sudo apt --fix-broken install
I get the following error
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
gir1.2-clutter-1.0 gir1.2-clutter-gst-3.0 gir1.2-cogl-1.0 gir1.2-coglpango-1.0
gir1.2-dbusmenu-glib-0.4 gir1.2-dee-1.0 gir1.2-gnomebluetooth-1.0
gir1.2-gst-plugins-base-1.0 gir1.2-gtkclutter-1.0 gir1.2-snapd-1 gir1.2-unity-5.0
hplip-data kpeople-vcard libchm1 libcodec2-0.9 libedataserverui-1.2-2
libegl1-mesa-dev libepub0 libextutils-pkgconfig-perl libfakekey0 libgeos-3.8.0
libgles2-mesa-dev libhdf5-cpp-103 libhfstospell11 libhogweed5:i386 libhpmud0
libkf5attica5 libkf5config-bin libkf5contacts-data libkf5contacts5
libkf5dbusaddons-bin libkf5kexiv2-15.0.0 libkf5people-data libkf5people5
libkf5peoplebackend5 libkf5peoplewidgets5 libkf5pulseaudioqt2 libmarkdown2
libmozjs-68-0 libnettle7:i386 libperl5.30 libphonenumber7 libpython3.8-dev
libqmobipocket2 libsane-hpaio libsndio-dev libsnmp35 libudev-dev libvoikko1
libvpx6 libwayland-bin libwayland-dev libxcursor-dev libxkbcommon-dev
libxrandr-dev libxv-dev libxxf86vm-dev lz4 perl-modules-5.30 printer-driver-hpcups
printer-driver-postscript-hp python3-pexpect python3-ptyprocess python3-renderpm
python3-reportlab python3-reportlab-accel python3-xkit python3.8-dev
qml-module-org-kde-people sonnet-plugins sshfs x11-apps x11-session-utils
x11proto-randr-dev x11proto-xf86vidmode-dev xbitmaps xinit
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
libpython2-stdlib python2
Suggested packages:
python2-doc python-tk
The following packages will be upgraded:
libpython2-stdlib python2
2 upgraded, 0 newly installed, 0 to remove and 1839 not upgraded.
2 not fully installed or removed.
Need to get 0 B/16.5 kB of archives.
After this operation, 68.6 kB disk space will be freed.
Do you want to continue? [Y/n] y
Setting up python2-minimal (2.7.18-3) ...
/var/lib/dpkg/info/python2-minimal.postinst: 4: python2.7: not found
dpkg: error processing package python2-minimal (--configure):
installed python2-minimal package post-installation script subprocess returned error
exit status 127
Errors were encountered while processing:
python2-minimal
E: Sub-process /usr/bin/dpkg returned an error code (1)
I appreciate any help !
Thanks
python2-minimal (= 2.7.17-2ubuntu4) but 2.7.18-3 is installed
. 2.7.18-3 = Ubuntu 22.04. You are running 22.04 packages on a 20.04 system...which doesn't work. Uninstall all those pesky 22.04 packages, and remove all those 22.04 sources. Revert to stock 20.04 as closely as possible...or release-upgrade to 22.04 properly. Your choice. – user535733 Jan 12 '24 at 19:43