Pip Install or Upgrade Fails with - Free(): Invalid Pointer Aborted

I get this error when trying to upgrade pip, pip3 or when I try to install a python package. What can I do?

root$ sudo -H pip3 install --upgrade pip Requirement already satisfied: pip in /usr/local/lib/python3.7/site-packages (21.0.1) Collecting pip Using cached pip-22.0.4-py3-none-any.whl (2.1 MB) free(): invalid pointer Aborted

I tried moving .cache so far and run this command as another user as well. Didn't help.

Edit: I'm using the following Ubuntu version

root$ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=18.04 DISTRIB_CODENAME=bionic DISTRIB_DESCRIPTION="Ubuntu 18.04.6 LTS"

Thanks in advance!

2
Elena Rostova

Elena Rostova

Lead Health, Wellness & Medical Journalist

Elena Rostova holds a Master's degree in Public Health Journalism. She covers groundbreaking medical research, holistic wellness trends, mental health awareness, and nutritional science.

Share this article