I was trying to repair texlive using the following script http://mirror.ctan.org/systems/texlive/tlnet/update-tlmgr-latest.sh
this messed up my /usr/bin directory. Now I am getting this error
bash: /usr/lib/command-not-found: /usr/bin/python3: bad interpreter: Permission denied
Somehow now I dont have python 2.7.
Also sudo apt update does not work any more.
I am using Ubuntu 16.04
How do I fix this errors
Try 1:
Downloaded python 2.7.6 ".tar" from official website and tried
./configure
Got Error
./configure.lineno: line 473: expr: command not found
echo $PATH
/home/USER/anaconda3/bin:/bin:/condabin:/home/USER/gv:/home/USER/bin:/home/USER/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/USER/g09/bsd:/home/USER/g09/local:/home/USER/g09/extras:/home/USER/g09
So I had to install ubuntu again. I installed ubuntu on same partition which had old ubuntu(messed up one) with out formatting the partition which preserves all the files are rewrites file which are essential for new install.
Hope this helps other who have same issue