Unable to locate package git termux что делать
How To Fix Unable To Locate Package in Termux 2021
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:
You can now verify whether the issue is fixed or not. You can run the linux commands as shown below.
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.
Python libraries #984
Comments
sfbarrerab commented May 4, 2017
Hi everyone, I am trying to use the python libraries (numpy, matplotlib, etc), but when I run:
packages install python-numpy
I obtained this error:
E: Unable to locate package python-numpy
Someone else have this problem? How can I fix it?
Thanks for your help and sorry for my english (I am from Colombia)
The text was updated successfully, but these errors were encountered:
Grimler91 commented May 4, 2017
Hi, you have to install numpy and the other modules through pip. See this thread.
its-pointless commented May 4, 2017 •
i recommend using apt rather than the eggs since hte eggs are no longer updated. Just a single line to sources.list and stuff.
fornwall commented May 4, 2017
Closing this in favour of the above mentioned #136 issue.
kirAn-sAi commented Oct 26, 2017
I also got the same issue while installing numpy, i pip command it is also not working
kirAn-sAi commented Nov 16, 2017
petacube commented Nov 30, 2017
kiran-sAi nice try but it does work for me either. i get error saying cannot compile Python.h
Grimler91 commented Nov 30, 2017
@petacube Python.h is provided by the package python-dev, so install python-dev with pkg install python-dev and try again.
petacube commented Nov 30, 2017
Grimler91 commented Nov 30, 2017
Mahesh222 commented Jul 10, 2020
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Package Error #6693
Comments
KentLavi commented Apr 26, 2021
Hello, I recently tried an apt update command on my termux, but when I run some commands it gets all errors, when I run the apt update command an error appears as below:
$ apt update Ign:1 https://dl.bintray.com/grimler/game-packages-24 games InRelease Ign:2 https://dl.bintray.com/grimler/science-packages-24 science InRelease Err:3 https://dl.bintray.com/grimler/game-packages-24 games Release 403 Forbidden Ign:4 https://main.termux-mirror.ml stable InRelease Err:5 https://dl.bintray.com/grimler/science-packages-24 science Release 403 Forbidden Err:6 https://main.termux-mirror.ml stable Release Redirection from https to ‘http://ww38.main.termux-mirror.ml/dists/stable/Release’ is forbidden Reading package lists. Done E: The repository ‘https://dl.bintray.com/grimler/game-packages-24 games Release’ does not have a Release file. N: Metadata integrity can’t be verified, repository is disabled now. N: Possible cause: repository is under maintenance or down (wrong sources.list URL?). E: The repository ‘https://dl.bintray.com/grimler/science-packages-24 science Release’ does not have a Release file. N: Metadata integrity can’t be verified, repository is disabled now. N: Possible cause: repository is under maintenance or down (wrong sources.list URL?). E: The repository ‘https://main.termux-mirror.ml stable Release’ does not have a Release file. N: Metadata integrity can’t be verified, repository is disabled now. N: Possible cause: repository is under maintenance or down (wrong sources.list URL?).
And when I run an install command like pkg install php it shows an error like this:
$ pkg install php Checking availability of current mirror: ok Reading package lists. Done Building dependency tree. Done E: Unable to locate package php
The text was updated successfully, but these errors were encountered:
xeffyr commented Apr 26, 2021
awoimbee commented May 1, 2021
agnostic-apollo commented May 1, 2021 •
@awoimbee Updates have not been released on playstore since last year since we can’t push them because termux-app does not comply with current play store polices. You should move to F-Droid releases instead. There is no reasonable way for us to notify users about this other than them checking our communities, wiki or github. Updating playstore description wasn’t possible for other maintainers since only fornwall had access to it and he hadn’t been available for months, asked him to do it couple of days back, but it still hasn’t been done.
gsmitheidw commented May 4, 2021
@agnostic-apollo Is there a recommended method to switch to F-Droid from PlayStore without re-installation and broken plugins?
In previous phones I’d used F-Droid but on this occasion, regrettably I used PlayStore
agnostic-apollo commented May 4, 2021
@gsmitheidw Yes, for Termux app, you can follow the Backing Up Termux instructions to preserve all your data during shifting. The plugins don’t store any critical data that I know of and should be safe to uninstall. Only termux
Tayaga334 commented May 6, 2021 •
It’s not work at all, still met the same error.
Can not update using apt #99
Comments
indam commented Dec 19, 2015
Hey, I reinstalled the app, and executed ‘apt update’, then failed. here is the screenshot.
The text was updated successfully, but these errors were encountered:
fornwall commented Dec 19, 2015
Could you try accessing http://apt.termux.com/dists/stable/InRelease in the browser on the device, and try running
fornwall commented Dec 19, 2015
Also, which Android device do you run? Which Android version? Running a custom ROM?
indam commented Dec 19, 2015
@fornwall thanks, please find it here. I installed termux from Google Play.
My phone is HTC M8, with the official ROM, android version 5.0.1, rooted.
indam commented Dec 19, 2015
And I tried to download the InRelease file, it seems not working for me.
indam commented Dec 19, 2015
oops, I am sorry, I closed this issue by mistake, could you please reopen it?
fornwall commented Dec 19, 2015
And I tried to download the InRelease file, it seems not working for me.
Can you access it (http://apt.termux.com/dists/stable/InRelease) in your Android browser? If not, what happens (blank page or error message)?
indam commented Dec 19, 2015
@fornwall I am sorry, I make you confused. I mean I can access it in browser, and also be able to download it with wget. But apt install still did not work for me.
fornwall commented Dec 19, 2015
@indam Ok, thanks for the confirmation! I’m trying to reproduce the problem, but I’m still unable to do so. So if you have the possibility to try a few things it would be helpful:
(1) Update to the latest apt version by hand, and see if it works afterwards:
(2) If the problem still persists, could you run the following and append the output here?
(3) Later, could you install strace by hand:
Then run the following
and upload the log.txt somewhere and link to it (or mail the file to me)?
indam commented Dec 19, 2015
@fornwall Yes, I put the screenshot here, and you can also find the log file as attachment.
fornwall commented Dec 19, 2015
@indam Thanks for all the help!
It seems that apt loads the url fine, but for some reason the lib/apt/methods/http binary seem to hit the line
indam commented Dec 20, 2015
@fornwall You are welcome. I hope this can be solved soon, and if you need more investigation, do not hesitate to contact me.
franciscod commented Dec 21, 2015
have you guys tried on another network? if you’re on 3G try wifi, if on wifi try 3G or another wifi, and so on
franciscod commented Dec 21, 2015
Also, notice this message in the first line:
res_send: select: Connection refused
It might be an issue on the server where the packages are hosted. Maybe hosting them on a mirror could help to diagnose the issue?
fornwall commented Dec 22, 2015
There was a DNS change done for apt.termux.com (updating the SOA record in the DNS zone to ensure it lines up with the nameservers in use by the domain) two days ago, could you try again if it works for you now @indam?
If it’s still a problem, could you install curl and check if e.g. curl http://apt.termux.com/ gives any error output (just ruling out some possible errors)?
jlefman commented Dec 23, 2015
There are issues with wget and apt. Curl works okay it seems.
franciscod commented Dec 23, 2015
maybe try verbosities of curl and wget to see effectively what IP address they’re trying to download from?
indam commented Dec 23, 2015
@fornwall I tried again, still the same problem. And I do not think this is due to the network, because I tried using different VPNs, it is still like this.
I test with curl, it seems fine. No errors found. @franciscod
jlefman commented Dec 23, 2015
Update
Manually installed all available updates in arm binaries under release packages using dpkg. No changes to apt error.
All packages installed:
fornwall commented Dec 23, 2015
I was able to reproduce the problem on a HTC One X with stock ROM, so I would guess that this is a HTC problem (the apt http code triggering debug logging on HTC system builds). Will look into it!
franciscod commented Dec 24, 2015
franciscod commented Dec 24, 2015
EDIT: no, server seems to be flaky.
fornwall commented Dec 26, 2015
For users stuck with the current non-working apt version, you can either re-install the application, or execute the following commands:
Thanks a lot for all the information provided which helped pinpoint where the problem was!
indam commented Dec 26, 2015
Thank you, it works for me now. 😀
jlefman commented Dec 28, 2015
👍 Working for my system as well. Thank you, @fornwall. Would it be possible to receive an explanation of the underlying issue and what this workaround is doing? Thank you for your time on this issue.
fornwall commented Dec 28, 2015
This debug output from a dedicated http fetching process in apt led to apt not being able to parse the http response, which caused to this problem.
The solution was to patch apt to disable SRV records by default for now, since it’s not something used by the Termux apt.
Устранение ошибки «E: Unable to locate package» на Ubuntu
Туториал для новичков: как избавиться от ошибки «E: Unable to locate package» на Linux Ubuntu.
Иногда в процессе установки происходит сбой. Уведомление выглядит следующим образом:
Текст ошибки говорит сам за себя. Система не может найти пакеты, которые вы пытаетесь установить. Почему это происходит?
Устранение ошибки «Unable to locate package» на Ubuntu
Шаг за шагом рассмотрим, что могло пойти не так.
1. Имя пакета
Это нужно проверить в первую очередь. Возможно, в название закралась опечатка. Если нужно установить «vlc», а в команде прописано «vcl», то, вполне естественно, процесс прервётся.
2. Обновление кэша репозитория
Во время первого старта системы необходимо запустить обновление при помощи следующей команды:
Эта команда не будет сразу же обновлять Ubuntu. Она предназначена для обновления информации о пакетах, содержащихся в репозиториях.
Когда запускается команда установки, apt-менеджер находит в кэше информацию о пакете и его версии, после чего загружает файлы через репозиторий. Соответственно, если пакета нет в кэше, появится уведомление об ошибке.
Сразу после установки новой системы, её кэш еще пуст. Именно поэтому в таких случаях необходимо прописать команду обновления как для Ubuntu, так и для любого другого дистрибутива на её основе (например, Linux Mint) во время первого запуска.
Но даже при работе с давно установленной системой есть шанс, что нужный пакет не был подгружен. Чтобы исключить такую вероятность, стоит перестраховаться и обновить кэш.
3. Доступен ли пакет для используемой версии Ubuntu
Итак, название написано правильно, кэш обновлён, но ошибка всё равно появляется.
Вероятно, пакет доступен через репозиторий Universe, а ваша система или не поддерживает его, или версия Ubuntu не поддерживается данной программой.
Шаг первый – проверить актуальную версию Ubuntu через терминал.
На выходе отображается номер версии и кодовое имя.
Например, версия Ubuntu 18.04 c кодовым именем “bionic”.
Шаг второй – расширенный поиск на сайте пакетов Ubuntu.
На сайте доступна опция поиска по ключевому слову. Вводим название пакета и выставляем кодовое имя дистрибутива. В графе ”секция” нужно выставить значение ”any”. Запускаем поиск.
Так можно узнать, доступен ли пакет для конкретной версии Ubuntu и, если доступен, то к какому репозиторию он относится. Разберём на примере Shutter, программы для создания скриншотов, которую не обновляли в течение последних лет. Для версии Ubuntu18.04 Bionic будут выведены следующие данные.
В этом случае есть точное совпадение с названием пакета. Он доступен для версии Ubuntu 18.04 Bionic и относится к репозиторию Universe.
Если искомый пакет доступен для вашей версии системы, но относится к Universe или Multiverse, необходимо установить дополнительные репозитории.
После этого обновите кэш, чтобы убедиться, что пакеты доступны через репозитории.
Ничего не помогло, что делать?
Если пакет недоступен и на сайте Ubuntu, то нужно искать другой способ установки. Усилиями сторонних разработчиков были созданы персональные архивы пакетов (PPA). Здесь стоит быть осторожными с неофициальными архивами и не добавлять сомнительные версии в систему.
Всегда есть вероятность, что проект был закрыт и более не поддерживается. В таком случае выход один: искать альтернативу самой программе.