Looking for a step by step guide to fix ‘unable to locate package’ in Termux on Android? Then you are on the right page.
Introduction
Termux is one of the best terminals for Android devices that allows you to run linux commands without having to root your device.
Some of the most popular packages are metasploit, hydra, python, nmap, gem, and Ubuntu. These modules are freely available at the resource server. You can install these packages without rooting your device. In some cases, however, termux throws an unexpected error message, saying, “unable to locate package ___“. It is due to the fact that termux does not have permission to access the local storage.
Termux does not have storage access by default.
So here in this guide, we are going to see ‘how to fix unable to locate package in termux’.
How to fix unable to locate package in Termux
You must manually grant termux access to the local storage to fix this issue.
Let’s see the step by step guide:
- First of all, Open termux terminal.
- And then run “termux-setup-storage” command without the quote.
- Then, a pop-up box will appear asking you to provide permission to get access to the local storage.
- Then, tap ‘Allow’.
- That’s it.
You can now verify whether the issue is fixed or not. You can run the linux commands as shown below.
ls | This command lists all the files and folders in the current folder. |
cd | This command lets you navigate throughout the folder. Like cd $HOME to navigate to the home directory. |
df | This command shows the amount of disk space used and available. |
mv | This command lets you move files between folders. |
You are now done.
Conclusion
Unable to locate packages is one of the common problems. A user’s issue arises when the termux terminal isn’t installed with the appropriate permissions on their android device. The solution stated above works with all packages such as metasploit, hydra, nmap, ubuntu, python, etc.
Thank you for reading this article. With the above step-by-step guide, I hope that you have been able to resolve your issue regarding the package. Feel free to post a comment if you’re still having trouble. I would be happy to answer any questions you have.