Share this article
Improve this guide
Cannot Open Shared Object no Such File or Directory [Fix]
To fix this manually install the missing packages
3 min. read
Published onOctober 4, 2024
published onOctober 4, 2024
Share this article
Improve this guide
Read our disclosure page to find out how can you help Windows Report sustain the editorial teamRead more
For fixing DLL errors, we recommend Fortect:
Fortect will search for an intitial version of your missing, corrupted or damaged DLL files that cause problems to your Windows OS and will replace it. Here is how to find them in 3 easy steps:
The Cannot open shared object no such file or directory usually affects developers that are using Linux or WSL on Windows. This error will prevent you from adding libraries to your project, so it’s important to fix it.
How do I fix Cannot open shared object no such file or directory error?
1. Install the missing library
A few users reported usingsudo apt install –reinstallfor libraries that are already installed, so try that as well.
If you’re getting this error while installing Qt, run the following command to install its dependencies:
sudo apt-get -y install build-essential openssl libssl-dev libssl1.0 libgl1-mesa-dev libqt5x11extras5 ‘^libxcb.*-dev’ libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev
2. Run the ldconfig command
This command will update the shared library cache and hopefully fix the problem.
3. Check for missing dependencies using the ldd
Pay close attention as some applications might be using a 32-bit architecture, so you’ll need to install modules that match that architecture.
4. Use the strip command
Keep in mind that this solution works only for libQt5Core.so.5, so be sure to change the library name in Step 1 name according to your error.
5. Manually add the library to the library path
The Cannot open shared object no such file or directory error will give you problems while developing, but luckily, you can fix this by installing the missing packages by following these steps.
This isn’t the only coding error you can encounter, and many reportedPermissionError Errno 13as well asOSError Errno 48.
If you’re a Python user, don’t miss our guide on thePython Runtime errorfor more information.
More about the topics:files,Linux,WSL
Milan Stanojevic
Windows Toubleshooting Expert
Milan has been enthusiastic about technology ever since his childhood days, and this led him to take interest in all PC-related technologies. He’s a PC enthusiast and he spends most of his time learning about computers and technology.
Before joining WindowsReport, he worked as a front-end web developer. Now, he’s one of the Troubleshooting experts in our worldwide team, specializing in Windows errors & software issues.
User forum
0 messages
Sort by:LatestOldestMost Votes
Comment*
Name*
Email*
Commenting as.Not you?
Save information for future comments
Comment
Δ
Milan Stanojevic
Windows Toubleshooting Expert
Before joining WindowsReport, he worked as a front-end web developer. Now, he’s specialized in Windows errors & software issues.