termux-user-repository / tur

A place for all types of Termux packages.
Other
362 stars 72 forks source link

Errors installing gcc-default-14 #1103

Closed angelog0 closed 4 days ago

angelog0 commented 5 days ago

Problem description

I tried to install gcc-default-14 but getting errors:

$ pkg install gcc-default-14
Checking availability of current mirror:
[*] https://grimler.se/termux/termux-main: ok
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  gcc-default-14
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 1368 B of archives.
After this operation, 32.8 kB of additional disk space will be used.
Get:1 https://tur.kcubeterm.com tur-packages/tur aarch64 gcc-default-14 all 0.3-1 [1368 B]
Fetched 1368 B in 2s (736 B/s)
Selecting previously unselected package gcc-default-14.
(Reading database ... 38204 files and directories currently installed.)
Preparing to unpack .../gcc-default-14_0.3-1_all.deb ...
Unpacking gcc-default-14 (0.3-1) ...
Setting up gcc-default-14 (0.3-1) ...
/data/data/com.termux/files/usr/var/lib/dpkg/info/gcc-default-14.postinst: 8: pacman-conf: not found
dpkg: error processing package gcc-default-14 (--configure):
 installed gcc-default-14 package post-installation script subprocess returned error exit status 127
Errors were encountered while processing:
 gcc-default-14
E: Sub-process /data/data/com.termux/files/usr/bin/dpkg returned an error code (1)

So tried to uninstall it:

$ apt autoremove --purge gcc-default-14
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
  gcc-default-14*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 32.8 kB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 38206 files and directories currently installed.)
Removing gcc-default-14 (0.3-1) ...
/data/data/com.termux/files/usr/var/lib/dpkg/info/gcc-default-14.prerm: 8: pacman-conf: not found
dpkg: error processing package gcc-default-14 (--remove):
 installed gcc-default-14 package pre-removal script subprocess returned error exit status 127
dpkg: too many errors, stopping
/data/data/com.termux/files/usr/var/lib/dpkg/info/gcc-default-14.postinst: 8: pacman-conf: not found
dpkg: error while cleaning up:
 installed gcc-default-14 package post-installation script subprocess returned error exit status 127
Errors were encountered while processing:
 gcc-default-14
Processing was halted because there were too many errors.
E: Sub-process /data/data/com.termux/files/usr/bin/dpkg returned an error code (1)

How to fix the above errors?

licy183 commented 4 days ago

Please share your termux-info. TERMUX_MAIN_PACKAGE_FORMAT is set by Termux APP and it should be debian if you use apt as package manager.

angelog0 commented 4 days ago

These are the info:

$ termux-info
Termux Variables:
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP__APK_FILE=/data/app/com.termux-3257r_b7-yMZda08rcmxWQ==/base.apk
TERMUX_APP__APK_RELEASE=F_DROID
TERMUX_APP__APP_VERSION_CODE=1020
TERMUX_APP__APP_VERSION_NAME=0.119.0-beta.1
TERMUX_APP__DATA_DIR=/data/user/0/com.termux
TERMUX_APP__IS_DEBUGGABLE_BUILD=false
TERMUX_APP__IS_INSTALLED_ON_EXTERNAL_STORAGE=false
TERMUX_APP__PACKAGE_NAME=com.termux
TERMUX_APP__PID=15516
TERMUX_APP__TARGET_SDK=28
TERMUX_VERSION=0.119.0-beta.1
TERMUX__SE_FILE_CONTEXT=u:object_r:app_data_file:s0:c512,c768
TERMUX__SE_INFO=default:targetSdkVersion=28:complete
TERMUX__SE_PROCESS_CONTEXT=u:r:untrusted_app:s0:c512,c768
TERMUX__UID=10156
TERMUX__USER_ID=0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://grimler.se/termux/termux-main stable main
# sources.list.d/pointless.list
deb https://its-pointless.github.io/files/24 termux extras
# tur-repo (sources.list.d/tur.list)
deb https://tur.kcubeterm.com tur-packages tur tur-on-device tur-continuous
Updatable packages:
All packages up to date
termux-tools version:
1.42.4
Android version:
8.1.0
Kernel build information:
Linux localhost 3.18.71-perf-g2211f76 #1 SMP PREEMPT Fri Nov 8 14:43:26 WIB 2019 aarch64 Android
Device manufacturer:
Xiaomi
Device model:
Redmi 5 Plus
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so

echo $TERMUX_MAIN_PACKAGE_FORMAT 
<EMPTY>

Installing pacman fixes the issue! Why I need pacman if I use apt/pkg commands?

licy183 commented 4 days ago

Should be closed by db481e8084266dd837e755a6bb050ec937022258.