termux / termux-packages

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

[Bug]: using pkg upgrade is breaking it and curl. #21987

Closed gensx-x1 closed 1 month ago

gensx-x1 commented 1 month ago

Problem description

Using pkg upgrade on completely fresh install is making it unable to connect to any mirror. I'm on galaxy s24 ultra, tried to download from fdroid and from website, same result. Tried 'termux-change-repo', didn't work, tried 'apt update && apt full-upgrade' also didn't work

What steps will reproduce the bug?

Run 'pkg upgrade' on new termux install

What is the expected behavior?

Pkg upgrade shouldn't break it

System information

Before running pkg upgrade , clean install:
~ $ termux-info
Termux Variables:
TERMUX_APK_RELEASE=F_DROID
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=6755
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://packages-cf.termux.dev/apt/termux-main/ stable main
Updatable packages:
apt/stable 2.8.1-1 aarch64 [upgradable from: 2.7.14]
bash/stable 5.2.37 aarch64 [upgradable from: 5.2.26-1]
ca-certificates/stable 1:2024.09.24 all [upgradable from: 1:2024.03.11-2]
command-not-found/stable 2.4.0-47 aarch64 [upgradable from: 2.4.0-29]
coreutils/stable 9.5-3 aarch64 [upgradable from: 9.5]
curl/stable 8.10.1-1 aarch64 [upgradable from: 8.8.0]
debianutils/stable 5.20 aarch64 [upgradable from: 5.19]
dpkg/stable 1.22.6-1 aarch64 [upgradable from: 1.22.6]
findutils/stable 4.10.0 aarch64 [upgradable from: 4.9.0-2]
gpgv/stable 2.4.5-3 aarch64 [upgradable from: 2.4.5-1]
inetutils/stable 2.4-2 aarch64 [upgradable from: 2.4-1]
less/stable 661 aarch64 [upgradable from: 633-1]
libandroid-support/stable 29 aarch64 [upgradable from: 28-3]
libassuan/stable 3.0.1-2 aarch64 [upgradable from: 2.5.7]
libc++/stable 27b aarch64 [upgradable from: 26b]
libcurl/stable 8.10.1-1 aarch64 [upgradable from: 8.8.0]
libgcrypt/stable 1.11.0 aarch64 [upgradable from: 1.10.3]
libgpg-error/stable 1.50 aarch64 [upgradable from: 1.49]
liblz4/stable 1.10.0 aarch64 [upgradable from: 1.9.4]
liblzma/stable 5.6.3 aarch64 [upgradable from: 5.6.2]
libnettle/stable 3.10 aarch64 [upgradable from: 3.9.1]
libnghttp2/stable 1.64.0 aarch64 [upgradable from: 1.62.1]
libnghttp3/stable 1.6.0 aarch64 [upgradable from: 1.3.0]
libsmartcols/stable 2.40.2-1 aarch64 [upgradable from: 2.39.3-4]
libssh2/stable 1.11.1 aarch64 [upgradable from: 1.11.0]
libtirpc/stable 1.3.6 aarch64 [upgradable from: 1.3.4-1]
libunbound/stable 1.22.0 aarch64 [upgradable from: 1.20.0]
libunistring/stable 1.3 aarch64 [upgradable from: 1.1]
nano/stable 8.2 aarch64 [upgradable from: 8.0]
ncurses/stable 6.5.20240831-2 aarch64 [upgradable from: 6.4.20231001-4]
openssl/stable 1:3.3.2 aarch64 [upgradable from: 1:3.2.1-1]
patch/stable 2.7.6-4 aarch64 [upgradable from: 2.7.6-3]
readline/stable 8.2.13 aarch64 [upgradable from: 8.2.10]
termux-am/stable 0.8.0-1 all [upgradable from: 0.8.0]
termux-keyring/stable 3.12-1 all [upgradable from: 3.12]
termux-tools/stable 1.44.1 all [upgradable from: 1.42.4]
util-linux/stable 2.40.2-1 aarch64 [upgradable from: 2.39.3-4]
xz-utils/stable 5.6.3 aarch64 [upgradable from: 5.6.2]
zstd/stable 1.5.6-2 aarch64 [upgradable from: 1.5.6]
termux-tools version:
1.42.4
Android version:
14
Kernel build information:
Linux localhost 6.1.57-android14-11-29543898-abS928BXXS3AXI8 #1 SMP PREEMPT Fri Sep 27 11:01:17 UTC 2024 aarch64 Android
Device manufacturer:
samsung
Device model:
SM-S928B
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so

After running pkg upgrade:
~ $ termux-info
Termux Variables:
TERMUX_APK_RELEASE=F_DROID
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=6755
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://packages-cf.termux.dev/apt/termux-main/ stable main
Updatable packages:
All packages up to date
termux-tools version:
1.44.1
Android version:
14
Kernel build information:
Linux localhost 6.1.57-android14-11-29543898-abS928BXXS3AXI8 #1 SMP PREEMPT Fri Sep 27 11:01:17 UTC 2024 aarch64 Android
Device manufacturer:
samsung
Device model:
SM-S928B
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
gensx-x1 commented 1 month ago

Output of 'pkg upgrade' after I run first 'pkg upgrade' ~ $ pkg upgrade -y No mirror or mirror group selected. You might want to select one by running 'termux-change-repo' Checking availability of current mirror: [*] https://packages-cf.termux.dev/apt/termux-main/: bad Testing the available mirrors: [*] (10) https://packages-cf.termux.dev/apt/termux-main: bad [*] (1) https://mirror.textcord.xyz/termux/termux-main: bad [*] (1) https://mirror.nevacloud.com/applications/termux/termux-main: bad [*] (1) https://mirrors.nguyenhoang.cloud/termux/termux-main: bad [*] (1) https://mirror.twds.com.tw/termux/termux-main: bad [*] (1) https://linux.domainesia.com/applications/termux/termux-main: bad [*] (1) https://tmx.xvx.my.id/apt/termux-main: bad [*] (1) https://mirror.freedif.org/termux/termux-main: bad [*] (1) https://mirrors.cbrx.io/apt/termux/termux-main: bad [*] (1) https://mirrors.in.sahilister.net/termux/termux-main/: bad [*] (1) https://mirror.albony.in/termux/termux-main: bad [*] (1) https://mirror.bardia.tech/termux/termux-main: bad [*] (1) https://mirrors.ravidwivedi.in/termux/termux-main: bad [*] (1) https://mirrors.saswata.cc/termux/termux-main: bad [*] (1) https://termux.niranjan.co/termux-main: bad [*] (1) https://mirrors.sdu.edu.cn/termux/termux-main: bad [*] (1) https://mirrors.sau.edu.cn/termux/apt/termux-main: bad [*] (1) https://mirrors.nju.edu.cn/termux/apt/termux-main: bad [*] (1) https://mirrors.sustech.edu.cn/termux/apt/termux-main: bad [*] (1) https://mirrors.pku.edu.cn/termux/termux-main/: bad [*] (1) https://mirror.sjtu.edu.cn/termux/termux-main/: bad [*] (1) https://mirror.iscas.ac.cn/termux/apt/termux-main: bad [*] (1) https://mirrors.ustc.edu.cn/termux/termux-main: bad [*] (1) https://mirrors.aliyun.com/termux/termux-main: bad [*] (1) https://mirrors.qvq.net.cn/termux/termux-main: bad [*] (1) https://mirrors.cqupt.edu.cn/termux/termux-main: bad [*] (1) https://mirrors.zju.edu.cn/termux/apt/termux-main: bad [*] (1) https://mirrors.hust.edu.cn/termux/apt/termux-main: bad [*] (1) https://mirrors.bfsu.edu.cn/termux/apt/termux-main: bad [*] (1) https://mirror.nyist.edu.cn/termux/apt/termux-main: bad [*] (1) https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-main: bad [*] (1) https://ftp.agdsn.de/termux/termux-main: bad [*] (4) https://grimler.se/termux/termux-main: bad [*] (1) https://ro.mirror.flokinet.net/termux/termux-main: bad [*] (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: bad [*] (1) https://mirror.bouwhuis.network/termux/termux-main: bad [*] (1) https://mirror.accum.se/mirror/termux.dev/termux-main: bad [*] (1) https://termux.mentality.rip/termux-main: bad [*] (1) https://is.mirror.flokinet.net/termux/termux-main: bad [*] (1) https://md.mirrors.hacktegic.com/termux/termux-main: bad [*] (1) https://mirror.mwt.me/termux/main: bad [*] (1) https://mirrors.medzik.dev/termux/termux-main: bad [*] (1) https://packages.termux.dev/apt/termux-main: bad [*] (1) https://mirror.sunred.org/termux/termux-main: bad [*] (1) https://mirrors.de.sahilister.net/termux/termux-main: bad [*] (1) https://mirror.leitecastro.com/termux/termux-main: bad [*] (1) https://termux.cdn.lumito.net/termux-main: bad [*] (1) https://nl.mirror.flokinet.net/termux/termux-main: bad [*] (1) https://ftp.fau.de/termux/termux-main: bad [*] (1) https://termux.librehat.com/apt/termux-main: bad [*] (1) https://mirror.autkin.net/termux/termux-main: bad [*] (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: bad [*] (1) https://mirror.mwt.me/termux/main: bad [*] (1) https://mirrors.utermux.dev/termux/termux-main: bad [*] (1) https://mirror.vern.cc/termux/termux-main: bad [*] (1) https://plug-mirror.rcac.purdue.edu/termux/termux-main: bad [*] (1) https://mirror.quantum5.ca/termux/termux-main: bad [*] (1) https://mirror.fcix.net/termux/termux-main: bad [*] (1) https://mirror.csclub.uwaterloo.ca/termux/termux-main: bad [*] (1) https://gnlug.org/pub/termux/termux-main: bad [*] (1) https://mirrors.middlendian.com/termux/termux-main: bad [*] (1) https://repository.su/termux/termux-main/: bad [*] (1) http://mirror.mephi.ru/termux/termux-main: bad Error: None of the mirrors are accessible

licy183 commented 1 month ago

Maybe the DNS server in $PREFIX/etc/resolv.conf (default is 8.8.8.8 or 8.8.4.4) is blocked by your ISP. See https://github.com/termux/termux-packages/issues/21727#issuecomment-2402527867.

I'll consider revert the c-ares support of libcurl if there are more reports.

twaik commented 1 month ago

There are more reports on discord. I think I've seen 3 or 4, that probably means much more people because there are only 8k members there.

gensx-x1 commented 1 month ago

$PREFIX/etc/resolv.conf looks exactly the same on clean install and after pkg upgrade so I don't think that might be an issue, I went through all recent issues I found related to this.

licy183 commented 1 month ago

You should change the DNS server in $PREFIX/etc/resolv.conf to some other well-known DNS servers in your country.

gensx-x1 commented 1 month ago

You should change the DNS server in $PREFIX/etc/resolv.conf to some other well-known DNS servers in your country.

Tried it just now, didn't work

licy183 commented 1 month ago

I still think there is something wrong with libcurl. Could you please check whether it is fixed after installing the libcurl without c-ares support in this workflow? https://github.com/termux/termux-packages/actions/runs/11534051643?pr=21988

gensx-x1 commented 1 month ago

I still think there is something wrong with libcurl. Could you please check whether it is fixed after installing the libcurl without c-ares support in this workflow? https://github.com/termux/termux-packages/actions/runs/11534051643?pr=21988

Can you link me to somewhere with tutorial on how to do it ? It's above my knowledge

twaik commented 1 month ago

Download the aarch64 artifact from the action run, unpack zip, unpack tar, install package with apt install ./<package.deb> and try to pkg up again.

gensx-x1 commented 1 month ago

alright , i thought that would be more complicated. so i tried it on fresh install, installed debs from commit, it didn't work at first, when i tried curl -V output was CANNOT LINK EXECUTABLE "curl": cannot locate symbol "SSL_set_value_uint" referenced by "/data/data/com.termux/files/usr/lib/libcurl.so"... so i run apt install openssl-tool and tried curl -V again , output was CANNOT LINK EXECUTABLE "curl": cannot locate symbol "libssh2_session_callback_set2" referenced by "/data/data/com.termux/files/usr/lib/libcurl.so"... so i just run apt upgrade -y and now it works. no idea how and what but i guess that should help you fix it a bit. let me know if you need more data from me