This morning I was recompiling an RPM that I need to test that's built with CMake and I went to uninstall the old one which was missing some stuff. After uninstalling the old one, I went to install the new one and suddenly I'm getting "no such file or directory" for every single command I execute. So for example, I try to "ls" and get /usr/bin/ls: No such file or directory
.
Through some experimenting I found that I could still change directory with cd
, and when I went to /usr/bin
, these binaries are still definitely there because I'm able to list the directory by using tab autocomplete, but even when I'm in that directory and do ./ls
, it gives the same message.
I closed my terminals thinking it was a hosed session, but now my terminal won't launch. I tried using ssh
to connect, but it refuses my password a few times before saying Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
.
I have a coworker who had a session open on my machine and he is getting the same errors when trying the same commands. He tried doing an export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
and the command completed, but it didn't change anything.
What do I do from here?
no such file or directory
for executables that are there may mean a missing loader. If every executable is failing then you probably won't be able to do anything from within this OS. In theory, if you mount the filesystem in a working Linux (like from live USB) and put right files in right places, you will fix it; the hard thing is to know all "right files" and "right places", I don't. (2) You taggedredhat-enterprise-linux
andcentos-8
. How should we interpret this?/usr/bin/ls
work? Can you run/usr/sbin/ldconfig
and does that help?