1

Without thinking much about what I was doing, I deleted the bin / python3 folder.

Now I have problems with all.

I cannot install anything. I tried too many different thing from here trying too find a solution, but nothing.

For example when I try to do sudo apt install software-properties-common, I get:

....
E: py3compile:243: Requested versions are not installed
dpkg: error processing package python3-dbus (--configure):
 installed python3-dbus package post-installation script subprocess returned error exit sta
tus 3
Setting up python3-apt (2.0.0ubuntu0.20.04.6) ...
E: py3compile:243: Requested versions are not installed

.... dpkg: error processing package python3-distro-info (--configure): installed python3-distro-info package post-installation script subprocess returned error e xit status 3 dpkg: dependency problems prevent configuration of python3-requests-unixsocket: python3-requests-unixsocket depends on python3-requests; however: Package python3-requests is not configured yet. python3-requests-unixsocket depends on python3-urllib3; however: Package python3-urllib3 is not configured yet.

dpkg: error processing package python3-requests-unixsocket (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: python3-dbus python3-apt software-properties-common python3-six unattended-upgrades python3-chardet python3-software-properties python3-certifi python3-gi python3-requests python3-idna python-setuptools python3-pip python3-urllib3 python3-minimal python-dnspython python3-distro-info python3-requests-unixsocket

When I try to do

sudo apt download python3* unattended-upgrades && sudo dpkg -i --force-all ./*.deb

I get the only output:

E: Unable to locate package python3-minimal_3.8.2-0ubuntu2_amd64.deb

I have Ubuntu 20.04

Apart from removing the python from bin I also touched the .bashrc fil.

My terminal and desktop works

sudo apt -f install

...
E: py3compile:243: Requested versions are not installed
dpkg: error processing package python3-dbus (--configure):
 installed python3-dbus package post-installation script subprocess returned err
or exit status 3
Setting up python3-apt (2.0.0ubuntu0.20.04.6) ...
E: py3compile:243: Requested versions are not installed
dpkg: error processing package python3-apt (--configure):
 installed python3-apt package post-installation script subprocess returned erro
r exit status 3
dpkg: dependency problems prevent configuration of software-properties-common:
 software-properties-common depends on python3-dbus; however:
  Package python3-dbus is not configured yet.

dpkg: error processing package software-properties-common (--configure): dependency problems - leaving unconfigured Setting up python3-six (1.14.0-2) ... E: py3compile:243: Requested versions are not installed dpkg: error processing package python3-six (--configure): installed python3-six package post-installation script subprocess returned erro r exit status 3 dpkg: dependency problems prevent configuration of unattended-upgrades: unattended-upgrades depends on python3-apt (>= 1.9.6~); however: Package python3-apt is not configured yet. unattended-upgrades depends on python3-dbus; however: Package python3-dbus is not configured yet. ... dpkg: error processing package python3-requests-unixsocket (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: python3-dbus python3-apt software-properties-common python3-six unattended-upgrades python3-chardet python3-software-properties python3-certifi python3-gi python3-requests python3-idna python-setuptools python3-pip python3-urllib3 python3-minimal python-dnspython python3-distro-info python3-requests-unixsocket E: Sub-process /usr/bin/dpkg returned an error code (1)

If I try to install python I get:

Setting up python3-minimal (3.8.2-0ubuntu2) ...
E: py3compile:243: Requested versions are not installed
dpkg: error processing package python3-minimal (--configure):
 installed python3-minimal package post-installation script subprocess returned error exit status 3
Errors were encountered while processing:
 python3-minimal
E: Sub-process /usr/bin/dpkg returned an error code (1)

Sudo apt update

Hit:1 http://es.archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://dl.google.com/linux/chrome/deb stable InRelease                   
Hit:3 http://es.archive.ubuntu.com/ubuntu focal-updates InRelease              
Hit:4 http://es.archive.ubuntu.com/ubuntu focal-backports InRelease            
Hit:5 http://ppa.launchpad.net/blaze/rtbth-dkms/ubuntu focal InRelease         
Hit:6 http://security.ubuntu.com/ubuntu focal-security InRelease           
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.

At the start of the session I get:

bash: pyenv: command not found
Nmath
  • 12,333
Annie
  • 13

1 Answers1

2

From the comments and other answers,

First OP restored their .bashrc file by using this question.

First back up the old file:

cp ~/.bashrc ~/.bashrc.bak

Copy the skeleton version of the file

cp /etc/skel/.bashrc ~/

Load the new file:

source ~/.bashrc

After that OP ran:

mkdir xyz && sudo mv /var/lib/dpkg/info/python3* ~/xyz
sudo mv /var/lib/dpkg/info/unattended-upgrades* ~/xyz && sudo mv /var/lib/dpkg/info/software-properties-common* ~/xyz 

Then they ran:

sudo cp -r /var/lib/dpkg/status $HOME
echo > /var/lib/dpkg/status

Then at the end, they ran:

sudo apt-get clean
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -f
Error404
  • 7,440