This (simple install using «apt install») does not work for me. Freshly installed termix.
$ apt —version
apt 1.2.1 (arm)
$ strace -tt -s99 -f -oLOG.TXT apt install sox
Reading package lists… Done
Building dependency tree… Done
E: Unable to locate package sox
Please find the LOG.TXT file attached. I don’t see any attempt to resolve «termux.net» thru DNS there… is that normal?
stracing «ping -c1 termux.net» shows how DNS resolution looks like in a working case:
…
18877 socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC, 0) = 4
18877 setsockopt(4, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
18877 connect(4, {sa_family=AF_LOCAL, sun_path=»/dev/socket/dnsproxyd»}, 110) = 0
18877 fcntl64(4, F_GETFL) = 0x2 (flags O_RDWR)
18877 fstat64(4, {st_mode=S_IFSOCK|0777, st_size=0, …}) = 0
18877 mprotect(0xb6e65000, 4096, PROT_READ|PROT_WRITE) = 0
18877 mprotect(0xb6e65000, 4096, PROT_READ) = 0
18877 write(4, «gethostbyname 0 termux.net 2», 29) = 29
18877 read(4, «222vtermux.net2420h22%352termh22$352et20h22$352et», 4096) = 75
18877 close(4) = 0
18877 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4
18877 socket(PF_LOCAL, SOCK_STREAM, 0) = 5
18877 connect(5, {sa_family=AF_LOCAL, sun_path=»/dev/socket/fwmarkd»}, 110) = 0
18877 sendmsg(5, {msg_name(0)=NULL, msg_iov(1)=[{«1», 12}], msg_controllen=16, [{cmsg_len=16, cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, [4]}], msg_flags=0}, 0) = 12
18877 recvfrom(5, «», 4, 0, NULL, NULL) = 4
18877 close(5) = 0
18877 connect(4, {sa_family=AF_INET, sin_port=htons(1025), sin_addr=inet_addr(«104.18.37.234»)}, 16) = 0
…
LOG.TXT
termux
1
2
У меня не работают команды apt и выдают ошибку:
$ apt-get upgrade
Reading package lists… Error!
E: Couldn’t create temporary file to work with /data/data/com.termux/files/usr/var/lib/apt/lists/termux.org_packages_dists_stable_Release — mkstemp (2: No such file or directory)
E: The package lists or status file could not be parsed or opened.
В Термуксе
- Ссылка
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.
Today you will learn the cause of the Termux package management issue, how to solve it, and other ways to solve it.
If you have installed the Termux app from the Playstore, you might face the below error while upgrading or installing the package on an Android device.
[*] Running apt update
Ign:2 https://dl.bintray.com/grimler/game-packages-24 games InRelease
Hit:1 https://packages.termux.dev/apt/termux-main stable InRelease Ign:3 https://dl.bintray.com/grimler/science-packages-24 science InRelease
Err:4 https://dl.bintray.com/grimler/game-packages-24 games Release 502 Bad Gateway
Err:5 https://dl.bintray.com/grimler/science-packages-24 science Release
502 Bad Gateway 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?).
What is the Cause of Package Command Errors in Termux?
The cause of this error is Termux build you’ve installed from the Playstore is no longer supported. Termux officially provides its latest version on Github and F-droid.
However, it is listed on the Playstore with an older version (v0.101
), which is not recommended.
Termux (v0.118.0
) moved the primary Termux package repository hosting from Bintray to Fosshost because the Bintray repository shut down on May 1st, 2021, which caused problems for users when running package installation and running the update command with pkg
or apt
commands.
Below is the error you may find while upgrading or installing packages.
E: The repository 'https://termux.org/packages stable Release' does no longer 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/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://science.termux-mirror.ml 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?).
How to Solve Package Command Errors in Termux
There are two different ways to solve this error, such as:
The first is by changing the mirror from the main repository to a different Termux mirror, and the second is by removing the unused repository.
Solution 1: Changing the Main Repository to a Different Termux Mirror
Execute the below command in your Termux app to change the main repository to a separate mirror.
Note: If you have installed
other package repositories
, likex11
androot
, then you must select and change those mirrors as well.
$ termux-change-repo
By default, the Main repository will be selected. Don’t change anything, just click on the OK button.
Here, the official repositories will be selected, but you can change it to Mirrors by BFSU or something else. And then click on the OK button.
Now it will automatically start the upgrade process.
Otherwise, run the pkg upgrade
command to update all packages to the latest available versions. If you face the same error, then follow Solution 2.
Solution 2: Removing the Unused Repository in Termux
If you are using the older version of Termux, it might still use the science
and game
repositories that have been merged into the main
repository.
If you have them installed, execute the following command to remove them.
$ apt remove science-repo game-repo
Below is the output of the above command.
Once you have removed the science-repo and game-repo, you need to run the pkg upgrade
command to update the repository.
If you are still getting the error, then you need to change the source repository from “Official repositories” to “Mirrors by BFSU”.
To change the repository, check Solution 1 of this article.
Wrap up
That’s all for this article, where you learned how to solve the termux package management issue while upgrading repositories.
I hope one of these solutions will resolve your Termux package management issue. However, if the error still persists, feel free to contact us in the comment section.
Innovative tech mind with 12 years of experience working as a computer programmer, web developer, and security researcher. Capable of working with a variety of technology and software solutions, and managing databases.
Termux – это эмулятор терминала для Android, позволяющий запускать утилиты командной строки. Одной из самых часто используемых утилит в Termux является apt. Однако при работе с apt могут возникать ошибки, которые иногда трудно исправить. В этой статье мы рассмотрим несколько простых способов исправления ошибок с apt upgrade и apt update.
Ошибка «Unable to fetch some archives»
Эта ошибка может возникнуть при выполнении apt update. Она указывает на то, что не удалось получить доступ к некоторым архивам. Чтобы исправить эту ошибку, следует выполнить следующие шаги:
-
Убедитесь, что у вас есть доступ к Интернету.
-
Проверьте свое соединение с Интернетом.
-
Обновите список источников пакетов apt, выполните команду:
apt-get update
- Попробуйте установить необходимые пакеты снова.
Ошибка «Unable to locate package»
Эта ошибка может возникнуть при выполнении apt update или apt-get update. Она указывает на то, что пакет, который вы пытаетесь установить, не найден в репозиториях apt. Чтобы исправить эту ошибку, следует выполнить следующие шаги:
-
Убедитесь, что вы правильно указали имя пакета.
-
Проверьте свое соединение с Интернетом.
-
Обновите список источников пакетов apt:
apt-get update
- Проверьте доступность пакета, используя команду apt-cache search:
apt-cache search package_name
Ошибка «E: dpkg was interrupted, you must manually run ‘dpkg —configure -a’»
Эта ошибка может возникнуть при выполнении apt upgrade. Она указывает на то, что процесс установки был прерван. Чтобы исправить эту ошибку, следует выполнить следующие шаги:
- Запустите команду:
dpkg --configure -a
- Попробуйте установить необходимые пакеты снова.
Заключение
В данной статье мы рассмотрели три простых способа исправления ошибок с apt upgrade и apt update в Termux. Надеемся, что эти советы помогут вам установить нужные пакеты и продолжить работу в Termux без проблем.
Содержание
- Не работает apt upgrade и apt update в termux
- Вот это выводит
- Package Error #6693
- Comments
- apt update and most of other commands with apt do not work and give errors #7220
- Comments
- Can not update using apt #99
- Comments
- Update
У меня не работают команды apt и выдают ошибку: $ apt-get upgrade Reading package lists… Error! E: Couldn’t create temporary file to work with /data/data/com.termux/files/usr/var/lib/apt/lists/termux.org_packages_dists_stable_Release — mkstemp (2: No such file or directory) E: The package lists or status file could not be parsed or opened.
Разберись почему apt не может создать temporary file, возможно места нет на диске, не хватает прав, или файловая система смонтирована только для чтения. Освой уже переводчик, apt же на чистом английском говорит тебе что ему не нравится. Тебе нужно всего лишь понять и исправить. Судя по $ ты apt от юзера запускаешь. Запускай от рута, у юзера прав не хватает.
Там не надо от рута, вы не понимаете суть Termux
Я даже не знаю что это такое. Вижу что apt временный файл создать не может, вот и предположил. Погуглил, тёмный лес для меня, андроид. Зря влез, извиняюсь.
В termux попробуй использовать pkg update и pkg upgrade .
Но скорее это одно и то же там 🙂
При этих командах такая же ошибка
А баг похож на твой? Там какое-то решение приводится,кажется
Вот это выводит
Ign:2 https://dl.bintray.com/grimler/game-packages-24 games InRelease Ign:3 https://dl.bintray.com/grimler/science-packages-24 science InRelease Ign:4 https://dl.bintray.com/xeffyr/unstable-packages unstable InRelease Ign:1 https://dl.bintray.com/termux/termux-packages-24 stable InRelease Get:6 https://dl.bintray.com/grimler/game-packages-24 games Release [5344 B] Get:7 https://dl.bintray.com/grimler/science-packages-24 science Release [6191 B] Get:8 https://dl.bintray.com/xeffyr/unstable-packages unstable Release [6065 B] Get:5 https://dl.bintray.com/termux/termux-packages-24 stable Release [6061 B] Get:9 https://dl.bintray.com/grimler/game-packages-24 games Release.gpg [475 B] Get:10 https://dl.bintray.com/grimler/science-packages-24 science Release.gpg [475 B] Err:9 https://dl.bintray.com/grimler/game-packages-24 games Release.gpg Couldn’t create temporary file /data/data/com.termux/files/usr/tmp/apt.conf.La09AA for passing config to apt-key Err:10 https://dl.bintray.com/grimler/science-packages-24 science Release.gpg Couldn’t create temporary file /data/data/com.termux/files/usr/tmp/apt.conf.ZXTUuK for passing config to apt-key Get:11 https://dl.bintray.com/xeffyr/unstable-packages unstable Release.gpg [821 B] Err:11 https://dl.bintray.com/xeffyr/unstable-packages unstable Release.gpg Couldn’t create temporary file /data/data/com.termux/files/usr/tmp/apt.conf.LpsX6h for passing config to apt-key Get:12 https://dl.bintray.com/termux/termux-packages-24 stable Release.gpg [821 B] Err:12 https://dl.bintray.com/termux/termux-packages-24 stable Release.gpg Couldn’t create temporary file /data/data/com.termux/files/usr/tmp/apt.conf.zdX2SJ for passing config to apt-key Fetched 26.3 kB in 1s (18.4 kB/s) Reading package lists… Error! W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://dl.bintray.com/grimler/game-packages-24 games Release: Couldn’t create temporary file /data/data/com.termux/files/usr/tmp/apt.conf.La09AA for passing config to apt-key W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://dl.bintray.com/grimler/science-packages-24 science Release: Couldn’t create temporary file /data/data/com.termux/files/usr/tmp/apt.conf.ZXTUuK for passing config to apt-key W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://dl.bintray.com/xeffyr/unstable-packages unstable Release: Couldn’t create temporary file /data/data/com.termux/files/usr/tmp/apt.conf.LpsX6h for passing config to apt-key W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://dl.bintray.com/termux/termux-packages-24 stable Release: Couldn’t create temporary file /data/data/com.termux/files/usr/tmp/apt.conf.zdX2SJ for passing config to apt-key W: Failed to fetch https://dl.bintray.com/grimler/game-packages-24/dists/games/Release.gpg Couldn’t create temporary file /data/data/com.termux/files/usr/tmp/apt.conf.La09AA for passing config to apt-key W: Failed to fetch https://dl.bintray.com/grimler/science-packages-24/dists/science/Release.gpg Couldn’t create temporary file /data/data/com.termux/files/usr/tmp/apt.conf.ZXTUuK for passing config to apt-key W: Failed to fetch https://dl.bintray.com/xeffyr/unstable-packages/dists/unstable/Release.gpg Couldn’t create temporary file /data/data/com.termux/files/usr/tmp/apt.conf.LpsX6h for passing config to apt-key W: Failed to fetch https://termux.org/packages/dists/stable/Release.gpg Couldn’t create temporary file /data/data/com.termux/files/usr/tmp/apt.conf.zdX2SJ for passing config to apt-key W: Some index files failed to download. They have been ignored, or old ones used instead. E: Couldn’t create temporary file to work with /data/data/com.termux/files/usr/var/lib/apt/lists/termux.org_packages_dists_stable_Release — mkstemp (2: No such file or directory) E: The package lists or status file could not be parsed or opened.
Если что-то не работает, значит оно не должно работать.
Поработай за него ^ автора apt-get
У меня идентично такая же ошибка. Решения пока не нашёл. Если найдёте решение — обязательно отпишитесь.
Источник
Package Error #6693
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
how do i fix this?
The text was updated successfully, but these errors were encountered:
Источник
apt update and most of other commands with apt do not work and give errors #7220
So i have recently installed termux(on samsung galaxy Note 9 if that could help). I really like the idea of linux terminal on android but after installation i started having some issues with this app. For some time no package managers like apt pkg and etc were working for me but somehow after several reinstalls problem with pkg was partially solved. But whatever i wouldn’t do, apt rarely ever worked for me. It worked only ones when i was installing sl ( just for fun ). In any other cases like installing some package like docker or apt update it was giving this errors:
apt update error:
$ apt update
Hit:1 https://termux.mentality.rip/termux-packages-24 stable InRelease
Ign:2 https://dl.bintray.com/grimler/game-packages-24 games InRelease Ign:3 https://dl.bintray.com/grimler/science-packages-24 science InRelease
Err:4 https://dl.bintray.com/grimler/game-packages-24 games Release 403 Forbidden
Err:5 https://dl.bintray.com/grimler/science-packages-24 science Release
403 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?).
docker installation error:
$ apt-get install docker.io -y
Reading package lists. Done
Building dependency tree Reading state information. Done
E: Unable to locate package docker.io
E: Couldn’t find any package by glob ‘docker.io’
E: Couldn’t find any package by regex ‘docker.io’
The text was updated successfully, but these errors were encountered:
Источник
Can not update using apt #99
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:
Could you try accessing http://apt.termux.com/dists/stable/InRelease in the browser on the device, and try running
Could you also paste the output of uname -a and apt —version?
Also, which Android device do you run? Which Android version? Running a custom ROM?
@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.
And I tried to download the InRelease file, it seems not working for me.
oops, I am sorry, I closed this issue by mistake, could you please reopen it?
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)?
@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.
@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)?
@fornwall Yes, I put the screenshot here, and you can also find the log file as attachment.
@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
in the system DNS resolver, res_send.c. This output interferes with the text-based protocol through which apt communicates with lib/apt/methods/http . Root cause still unknown.
@fornwall You are welcome. I hope this can be solved soon, and if you need more investigation, do not hesitate to contact me.
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
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?
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)?
There are issues with wget and apt. Curl works okay it seems.
- not rooted
- OS v5.0.2
- HTC Desire Eye type phone
maybe try verbosities of curl and wget to see effectively what IP address they’re trying to download from?
@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
Update
Manually installed all available updates in arm binaries under release packages using dpkg. No changes to apt error.
All packages installed:
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!
EDIT: no, server seems to be flaky.
Hi, finally this issue with (certain?) HTC devices not working with apt can now be resolved! It’s fixed in a new version of the apt package, version 1.1.6 . This now comes as part of the bootstrap installation for new users.
For users stuck with the current non-working apt version, you can either re-install the application, or execute the following commands:
This should work around the issue and update apt to the working version 1.1.6 , after which you can update and install packages as normal.
Thanks a lot for all the information provided which helped pinpoint where the problem was!
Thank you, it works for me now. 😀
👍 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.
@jlefman The problem was that apt version 1.1 introduced support for SRV records, whose retrieval using system functions seems to cause debug logging on (certain?) HTC devices — perhaps due to HTC having left the debug flag on by mistake.
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.
Источник