As a drastic measure, you can solve this problem by uninstalling all the TeX packages and do a fresh install.
To uninstall TeX packages, purge the tex-common package and then auto remove the unnecessary packages:
- $sudo apt-get purge tex-common
- $sudo apt-get autoremove
Thereafter do a fresh LaTeX install:
- $sudo apt-get install texlive
- $sudo apt-get install texlive-latex-extra
If you encounter the error "eqnarray.sty not found" download eqnarray.sty and put this file in your latex files directory.
This solution has been tested under Ubuntu Linux 18.04 LTS.