I'm working with Ubuntu 22.04 and texlive (I'm using the Ubuntu texlive from tug.org). I tried to install miktex but gave up because I could not finalize the installation of the miktex console, which would have allowed me to finalize the complete installation. Since I uninstalled miktex, the texhash command no longer works.

sudo texhash

the terminal answers me:

texhash: error while loading shared libraries: libmiktex-setup.so.6: cannot open shared object file: No such file or directory

However, I uninstalled miktex using the dedicated page and reinstalled texlive.

I just deleted the path


but the same error message responded to me from the terminal when I run the texhash command and the return of type -all texhash :

texhash is /usr/local/bin/texhash texhash is /usr/bin/texhash texhash is /bin/texhash texhash is /usr/local/texlive/2024/bin/x86_64-linux/texhash

Do you have an idea?

New contributor
Régis FDS is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • Welcome to TeX.SE!
    – Mensch
    Commented Jun 10 at 7:53
  • 1
    well it looks as if you did not completly deinstalled miktex as its texhash is still found. Commented Jun 10 at 7:54

1 Answer 1


On installing texlive from tug you should have put the texlive bin directory, most likely


at the front of your PATH.

If you have done that it makes no difference if miktex is installed or not, the texlive one will be used.

On the commandline type

type -all texhash

it will list the found versions eg I get

$ type -all texhash
texhash is /usr/local/texlive/2024/bin/x86_64-linux/texhash
texhash is /usr/bin/texhash
texhash is /bin/texhash

showing I'm using tl2024 but have unused ubuntu provided tex further down the PATH in /usr/bin

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .