0

When I power on my Ubuntu PC, it doesn't load.Then I go to Ubuntu recovery mode and try the below command:

enter image description here

$ sudo service lightdm restart

--bash: /usr/lib/command-not-found: /usr/bin/python3: bad interpreter No such file or directory

Whenever I apply sudo command,it always shows the above error.

The below answer recommends me to boot from live disk and then chroot into the installed Ubuntu partition.I tried that, but still the same error message exists,

ubuntu@ubuntu:~$ sudo mount /dev/sda3 /mnt
ubuntu@ubuntu:~$ sudo chroot /mnt
 bash: groups: command not found
root@ubuntu:/# sudo apt-get install --reinstall coreutils
 bash: /usr/lib/command-not-found: /usr/bin/python3: bad interpreter: No such file or directory
root@ubuntu:/#
Avinash Raj
  • 78,556

2 Answers2

2

This looks like it's having issue mounting or finding many executables. When a system can't find several things, such as in your instance, it also always tells me that the system is either:

  1. Having a hardware failure, HDD, typically
  2. Having a system-wide configuration issue and cannot mount the / partition
  3. Having a $HOME/.bashrc or /etc/bashrc type of configuration issue

I would try and make sure it isn't #2 to start. Follow the steps outlined in the RecoverMode or LiveCdRecovery topic in the Ubuntu wiki to start.

slm
  • 3,035
1

I am suspecting you may be missing the file /usr/bin/env. Accoding to this answer it is provided by coreutils. You could try repairing your system by using the LiveCD and making a chroot to your pc hard drive partition. See the instructions in LiveCDRecovery, section Update Failure. After the chroot, you should be able to re-install coreutils.