[Solved] Shared libraries Loading Error: libhwloc.so.5: cannot open shared object file: No such file or directory

This problem occurs when installing a service:

error while loading shared libraries: libhwloc.so.5: cannot open shared object file: No such file or directory

Twice, once on Ubuntu 18 and once on Ubuntu 20.

The solution is as follows:


# Important
sudo apt-get install -y libhwloc-dev

# Method 1:
sudo ln -s /usr/lib/x86_64-linux-gnu/libhwloc.so.5.7.6 /usr/lib/x86_64-linux-gnu/libhwloc.so.15

# Method 2:
sudo ln -s /usr/lib/x86_64-linux-gnu/libhwloc.so /usr/lib/x86_64-linux-gnu/libhwloc.so.5

When this problem is encountered for the first time, it is normal after executing the command of processing method 1.

However, if you change the system for the second time and use the command of processing method 1, an error will still be reported. So I went to/usr/lib/x86_ Find the file in the 64 Linux GNU directory and find that there is no libhwloc. So. 5. I think it’s outrageous. The installation package was installed normally, but the command was not installed. I’m convinced. I checked the Internet several times, but there was no answer, so I tried to forcibly add a libhwloc. So. 5 file, that is, create a soft connection. I didn’t think it was really OK, ™ Great efforts work miracles.

Similar Posts: