termux / termux-packages

A package build system for Termux.
https://termux.dev
Other
13.39k stars 3.08k forks source link

[Bug]: impossible to install package: unmet dependencies #21157

Closed L0Lock closed 3 months ago

L0Lock commented 3 months ago

Problem description

I'm trying to install ani-cli which gives me an unmet dependency error:

ncurses-utils : Depends: ncurses (= 6.4.20231001-1) but 6.4.20231001-4 is to be installed
E: Unable to correct problems, you have held broken packages.

But when i try to install ncurses, it says it's already using that very version:

ncurses is already the newest version (6.4.20231001-4).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

What steps will reproduce the bug?

Following ani-cli's install procedure. Here's my attempt, with my fixing trials:

pkg up -y
No mirror or mirror group selected. You might want to select one by running 'termux-change-repo'
Testing the available mirrors:
[*] (10) https://packages-cf.termux.dev/apt/termux-main: ok
[*] (1) https://mirror.textcord.xyz/termux/termux-main: bad
[*] (1) https://mirror.nevacloud.com/applications/termux/termux-main: ok
[*] (1) https://mirrors.nguyenhoang.cloud/termux/termux-main: ok
[*] (1) https://mirror.twds.com.tw/termux/termux-main: ok
[*] (1) https://linux.domainesia.com/applications/termux/termux-main: ok
[*] (1) https://tmx.xvx.my.id/apt/termux-main: ok
[*] (1) https://mirror.freedif.org/termux/termux-main: ok
[*] (1) https://mirrors.cbrx.io/apt/termux/termux-main: ok
[*] (1) https://mirrors.in.sahilister.net/termux/termux-main/: ok
[*] (1) https://mirror.albony.in/termux/termux-main: ok
[*] (1) https://mirror.bardia.tech/termux/termux-main: bad
[*] (1) https://mirrors.sdu.edu.cn/termux/termux-main: ok
[*] (1) https://mirrors.sau.edu.cn/termux/apt/termux-main: ok
[*] (1) https://mirrors.nju.edu.cn/termux/apt/termux-main: ok
[*] (1) https://mirrors.sustech.edu.cn/termux/apt/termux-main: ok
[*] (1) https://mirrors.pku.edu.cn/termux/termux-main/: ok
[*] (1) https://mirror.sjtu.edu.cn/termux/termux-main/: ok
[*] (1) https://mirror.iscas.ac.cn/termux/apt/termux-main: ok
[*] (1) https://mirrors.ustc.edu.cn/termux/termux-main: ok
[*] (1) https://mirrors.aliyun.com/termux/termux-main: ok
[*] (1) https://mirrors.qvq.net.cn/termux/termux-main: ok
[*] (1) https://mirrors.cqupt.edu.cn/termux/termux-main: ok
[*] (1) https://mirrors.zju.edu.cn/termux/apt/termux-main: ok
[*] (1) https://mirrors.hust.edu.cn/termux/apt/termux-main: ok
[*] (1) https://mirrors.bfsu.edu.cn/termux/apt/termux-main: ok
[*] (1) https://mirror.nyist.edu.cn/termux/apt/termux-main: ok
[*] (1) https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-main: ok
[*] (1) https://ftp.agdsn.de/termux/termux-main: ok
[*] (4) https://grimler.se/termux/termux-main: ok
[*] (1) https://ro.mirror.flokinet.net/termux/termux-main: ok
[*] (1) https://mirrors.cfe.re/termux/termux-main: bad
[*] (1) https://mirror.termux.dev/termux-main: bad
[*] (1) https://termux.3san.dev/termux/termux-main: ok
[*] (1) https://mirror.bouwhuis.network/termux/termux-main: ok
[*] (1) https://mirror.accum.se/mirror/termux.dev/termux-main: ok
[*] (1) https://termux.mentality.rip/termux-main: ok
[*] (1) https://is.mirror.flokinet.net/termux/termux-main: ok
[*] (1) https://md.mirrors.hacktegic.com/termux/termux-main: ok
[*] (1) https://termux.astra.in.ua/apt/termux-main: ok
[*] (1) https://mirror.mwt.me/termux/main: ok
[*] (1) https://mirrors.medzik.dev/termux/termux-main: ok
[*] (1) https://packages.termux.dev/apt/termux-main: ok
[*] (1) https://mirror.sunred.org/termux/termux-main: ok
[*] (1) https://mirrors.de.sahilister.net/termux/termux-main: ok
[*] (1) https://mirror.leitecastro.com/termux/termux-main: ok
[*] (1) https://termux.cdn.lumito.net/termux-main: ok
[*] (1) https://nl.mirror.flokinet.net/termux/termux-main: ok
[*] (1) https://ftp.fau.de/termux/termux-main: ok
[*] (1) https://termux.librehat.com/apt/termux-main: ok
[*] (1) https://mirror.autkin.net/termux/termux-main: ok
[*] (1) https://mirror.polido.pt/termux/termux-main: bad
[*] (1) https://dl.kcubeterm.com/termux-main: bad
[*] (1) https://termux.danyael.xyz/termux/termux-main: ok
[*] (1) https://mirror.mwt.me/termux/main: ok
[*] (1) https://mirrors.utermux.dev/termux/termux-main: ok
[*] (1) https://mirror.vern.cc/termux/termux-main: ok
[*] (1) https://plug-mirror.rcac.purdue.edu/termux/termux-main: ok
[*] (1) https://mirror.quantum5.ca/termux/termux-main: ok
[*] (1) https://mirror.fcix.net/termux/termux-main: ok
[*] (1) https://mirror.csclub.uwaterloo.ca/termux/termux-main: ok
[*] (1) https://mirror.endianness.com/termux/termux-main: ok
[*] (1) https://mirrors.rda.run/termux/termux-main: bad
[*] (1) https://repository.su/termux/termux-main/: ok
[*] (1) http://mirror.mephi.ru/termux/termux-main: ok
Picking mirror: (47) /data/data/com.termux/files/usr/etc/termux/mirrors/europe/termux.astra.in.ua
Get:1 https://termux.astra.in.ua/apt/termux-main stable InRelease [14.0 kB]
Get:2 https://termux.astra.in.ua/apt/termux-main stable/main aarch64 Packages [495 kB]
Fetched 509 kB in 3s (193 kB/s)
Reading package lists... Done
Building dependency tree... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
~ $ pkg install ani-cli
No mirror or mirror group selected. You might want to select one by running 'termux-change-repo'
Checking availability of current mirror:
[*] https://termux.astra.in.ua/apt/termux-main: ok
Reading package lists... Done
Building dependency tree... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 ncurses-utils : Depends: ncurses (= 6.4.20231001-1) but 6.4.20231001-4 is to be installed
E: Unable to correct problems, you have held broken packages.
~ $ apt update && apt --fix-broken install
Hit:1 https://termux.astra.in.ua/apt/termux-main stable InRelease
Reading package lists... Done
Building dependency tree... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
~ $ pkg install ani-cli
No mirror or mirror group selected. You might want to select one by running 'termux-change-repo'
Checking availability of current mirror:
[*] https://termux.astra.in.ua/apt/termux-main: ok
Reading package lists... Done
Building dependency tree... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 ncurses-utils : Depends: ncurses (= 6.4.20231001-1) but 6.4.20231001-4 is to be installed
E: Unable to correct problems, you have held broken packages.
~ $ pkg upgrade
No mirror or mirror group selected. You might want to select one by running 'termux-change-repo'
Checking availability of current mirror:
[*] https://termux.astra.in.ua/apt/termux-main: ok
Hit:1 https://termux.astra.in.ua/apt/termux-main stable InRelease
Reading package lists... Done
Building dependency tree... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
~ $ pkg install ani-cli
No mirror or mirror group selected. You might want to select one by running 'termux-change-repo'
Checking availability of current mirror:
[*] https://termux.astra.in.ua/apt/termux-main: ok
Reading package lists... Done
Building dependency tree... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 ncurses-utils : Depends: ncurses (= 6.4.20231001-1) but 6.4.20231001-4 is to be installed
E: Unable to correct problems, you have held broken packages.
~ $ pkg install ncurses
No mirror or mirror group selected. You might want to select one by running 'termux-change-repo'
Checking availability of current mirror:
[*] https://termux.astra.in.ua/apt/termux-main: ok
Reading package lists... Done
Building dependency tree... Done
ncurses is already the newest version (6.4.20231001-4).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
~ $ pkg install ncurses-utils
No mirror or mirror group selected. You might want to select one by running 'termux-change-repo'
Checking availability of current mirror:
[*] https://termux.astra.in.ua/apt/termux-main: ok
Reading package lists... Done
Building dependency tree... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 ncurses-utils : Depends: ncurses (= 6.4.20231001-1) but 6.4.20231001-4 is to be installed
E: Unable to correct problems, you have held broken packages.
~ $

What is the expected behavior?

No response

System information

~ $ termux-info
Termux Variables:
TERMUX_APK_RELEASE=F_DROID
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=8525
TERMUX_IS_DEBUGGABLE_BUILD=0
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.1
TERMUX__USER_ID=0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://termux.astra.in.ua/apt/termux-main stable main
Updatable packages:
All packages up to date
termux-tools version:
1.42.4
Android version:
12
Kernel build information:
Linux localhost 4.19.191+-ab3824 #1 SMP PREEMPT Wed Mar 13 09:49:23 CST 2024 aarch64 Android
Device manufacturer:
XPPen
Device model:
MagicDrawingPad
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
TomJo2000 commented 3 months ago

Hmm ani-cli doesn't explicitly depend on ncurses. https://github.com/termux/termux-packages/blob/c4808a5e07cdde67ff2f0fa301bbb44a2fea4724/packages/ani-cli/build.sh#L1-L9 So I'm not sure why it's trying to force such an overly specific version.

Biswa96 commented 3 months ago

Please try to update or reinstall ncurses-utils and ncurses packages.

sylirre commented 3 months ago

https://termux.astra.in.ua/apt/termux-main is a BAD MIRROR.

Use termux-change-repo and select another one. Arrows to navigate, space button to select, enter to confirm the made selection.

This mirror was excluded from the lists in the most up-to-date termux-tools package.

sylirre commented 3 months ago

This issue happens because ncurses version in the current Termux app is newer than what repository provides.

Pay attention to the date stamps.

1 2

Biswa96 commented 3 months ago

Is there any public web page to show termux mirror status or latest update time? There were multiple issues like this one with older out-of-date mirrors.

TomJo2000 commented 3 months ago

The Wiki mentions https://mirror.termux.dev/?mirrorstats but that seems to be down or outdated.

L0Lock commented 3 months ago

As suggested by @sylirre here, I used termux-change-repo. It asked me to choose to change either a group or a single mirror, i chose group, then the group for my region. After it was done working, I resumed the installation process from start:

pkg up -y
pkg install ani-cli

And it worked flawlessly.

Thanks for the help!