Cannot Link Executable Error
Resolving the "CANNOT LINK EXECUTABLE" error for wget, curl, and other utilities in Termux.
If you are encountering the CANNOT LINK EXECUTABLE "wget": library "libssl.so.3" or similar errors for curl and other commands, please read the following solutions.
The Problem
This error occurs when Termux utilities like wget
or curl
cannot find or link to the required OpenSSL library (libssl.so.3
). This typically happens due to:
- Outdated or corrupted package repositories
- Missing OpenSSL dependencies
- Repository mirror connection issues
Solutions
Try these solutions in order. If one doesn't work, proceed to the next:
Solution 1: Change Repository Mirror
The most common fix is to switch to a more reliable repository mirror.
Open the repository selection tool
termux-change-repo
Select "Main repository"
Use the arrow keys to navigate and press Enter to select.
Choose "Mirror by BFSU"
Select the BFSU (Beijing Foreign Studies University) mirror from the list.
Confirm and apply
Press OK to apply the changes.
Restart Termux
Close and restart the Termux app completely.
Solution 2: Update and Upgrade Packages
If changing the repository doesn't resolve the issue, try updating all packages.
Update package lists
apt-get update
Upgrade installed packages
apt-get upgrade
Test the fix
Try running your command again to verify it works.
Solution 3: Reinstall OpenSSL
If the above solutions don't work, the OpenSSL library may need to be reinstalled.
Additional Tips
If you continue experiencing issues after trying all solutions:
- Ensure you have a stable internet connection
- Try switching to a different repository mirror if BFSU doesn't work
- Consider reinstalling Termux from F-Droid (recommended) instead of the Play Store