Request for assistance (hopefully not OT)
Loris Bennett
loris.bennett at fu-berlin.de
Tue May 17 09:00:10 EDT 2022
o1bigtenor <o1bigtenor at gmail.com> writes:
> Greetings
>
> I was having space issues in my /usr directory so I deleted some
> programs thinking that the space taken was more an issue than having
> older versions of the program.
>
> So one of the programs I deleted (using rm -r) was python3.9.
Deleting anything from /usr via 'rm -r' which was installed via the
package manager is an extremely bad idea. If you want to remove stuff,
use the package manager.
> Python3.10 was already installed so I thought (naively!!!) that things
> should continue working.
> (Python 3.6, 3.7 and 3.8 were also part of this cleanup.)
Python 3.10 may be installed, but a significant number of packages
depend on Python 3.9. That's why you should use the package manager -
it knows all about the dependencies.
> So now I have problems.
I think you had a problem before that. Debian testing is not an
operating system you should be using if you have a fairly good
understanding of how Debian (or Linux in general) works.
> Following is the system barf that I get when I run '# apt upgrade'.
>
> What can I do to correct this self-inflicted problem?
>
> (running on debian testing 5.17
I think you mean just 'Debian testing', which is what will become the
next version of Debian, i.e. Debian 12. The '5.17' is just the kernel
version, not a version of Debian.
> Setting up python2.7-minimal (2.7.18-13.1) ...
> Could not find platform independent libraries <prefix>
> Could not find platform dependent libraries <exec_prefix>
> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
> /usr/bin/python2.7: can't open file
> '/usr/lib/python2.7/py_compile.py': [Errno 2] No such file or
> directory
> dpkg: error processing package python2.7-minimal (--configure):
> installed python2.7-minimal package post-installation script
> subprocess returned error exit status 2
> Setting up python3.9-minimal (3.9.12-1) ...
> update-binfmts: warning: /usr/share/binfmts/python3.9: no executable
> /usr/bin/python3.9 found, but continuing anyway as you request
> /var/lib/dpkg/info/python3.9-minimal.postinst: 51: /usr/bin/python3.9: not found
> dpkg: error processing package python3.9-minimal (--configure):
> installed python3.9-minimal package post-installation script
> subprocess returned error exit status 127
> dpkg: dependency problems prevent configuration of python3.9:
> python3.9 depends on python3.9-minimal (= 3.9.12-1); however:
> Package python3.9-minimal is not configured yet.
>
> dpkg: error processing package python3.9 (--configure):
> dependency problems - leaving unconfigured
> dpkg: dependency problems prevent configuration of python2.7:
> python2.7 depends on python2.7-minimal (= 2.7.18-13.1); however:
> Package python2.7-minimal is not configured yet.
>
> dpkg: error processing package python2.7 (--configure):
> dependency problems - leaving unconfigured
> dpkg: dependency problems prevent configuration of python3.9-dev:
> python3.9-dev depends on python3.9 (= 3.9.12-1); however:
> Package python3.9 is not configured yet.
>
> dpkg: error processing package python3.9-dev (--configure):
> dependency problems - leaving unconfigured
> . . .
> Errors were encountered while processing:
> python2.7-minimal
> python3.9-minimal
> python3.9
> python2.7
> python3.9-dev
It might be possible to fix the system. If will probably be fairly
difficult, but you would probably learn a lot doing it. However, if I
were you, I would just install Debian stable over your borked system and
then learn a bit more about package management.
Cheers,
Loris
--
This signature is currently under construction.
More information about the Python-list
mailing list