termux / termux-packages

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

[Bug]: Error while installing openbals #17436

Closed anishdevtech closed 1 year ago

anishdevtech commented 1 year ago

Problem description

Description: I was trying to install openblas eich is required for opencv and other

Welcome to Termux!

Community forum: https://termux.com/community
Gitter chat:     https://gitter.im/termux/termux
IRC channel:     #termux on libera.chat

Working with packages:

 * Search packages:   pkg search <query>
 * Install a package: pkg install <package>
 * Upgrade packages:  pkg upgrade

Subscribing to additional repositories:

 * Root:     pkg install root-repo
 * X11:      pkg install x11-repo

Report issues at https://termux.com/issues

~ $ pkg install opencv python-torchvision python-torch python-numpy

Testing the available mirrors:
[*] (10) https://packages-cf.termux.dev/apt/termux-main: ok
[*] (1) https://mirror.bardia.tech/termux/termux-main: bad
[*] (1) https://linux.domainesia.com/applications/termux/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.cbrx.io/apt/termux/termux-main: ok
[*] (1) https://mirror.albony.xyz/termux/termux-main: ok
[*] (1) https://packages.nscdn.top/termux-main: bad
[*] (1) https://mirrors.bfsu.edu.cn/termux/apt/termux-main: ok
[*] (1) https://mirrors.sustech.edu.cn/termux/apt/termux-main: ok
[*] (1) https://mirrors.nju.edu.cn/termux/apt/termux-main: ok
[*] (1) https://mirrors.zju.edu.cn/termux/apt/termux-main: bad
[*] (1) https://mirrors.aliyun.com/termux/termux-main: ok
[*] (1) https://mirrors.hit.edu.cn/termux/apt/termux-main: ok
[*] (1) https://mirror.iscas.ac.cn/termux/apt/termux-main: ok
[*] (1) https://mirrors.sdu.edu.cn/termux/termux-main: ok
[*] (1) https://mirrors.sau.edu.cn/termux/apt/termux-main: ok
[*] (1) https://mirrors.ustc.edu.cn/termux/apt/termux-main: bad
[*] (1) https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-main: bad
[*] (1) https://mirror.sjtu.edu.cn/termux/termux-main/: ok
[*] (1) https://mirrors.scau.edu.cn/termux/apt/termux-main: bad
[*] (1) https://mirrors.cqupt.edu.cn/termux/apt/termux-main: bad
[*] (1) https://mirrors.njupt.edu.cn/termux/apt/termux-main: bad
[*] (1) https://mirrors.pku.edu.cn/termux/termux-main/: bad
[*] (1) https://mirror.nyist.edu.cn/termux/apt/termux-main: ok
[*] (1) https://mirrors.dgut.edu.cn/termux/apt/termux-main: bad
[*] (1) https://termux.cdn.lumito.net/termux-main: ok
[*] (1) https://mirror.mwt.me/termux/main: ok
[*] (1) https://mirror.accum.se/mirror/termux.dev/termux-main: ok
[*] (1) https://termux.3san.dev/termux/termux-main: bad
[*] (1) https://termux.mentality.rip/termux-main: ok
[*] (1) https://packages.termux.dev/apt/termux-main: ok
[*] (1) https://mirror.termux.dev/termux-main: ok
[*] (1) https://mirrors.sahilister.in/termux/termux-main: ok
[*] (1) https://ftp.fau.de/termux/termux-main: ok
[*] (1) https://termux.librehat.com/apt/termux-main: ok
[*] (1) https://md.mirrors.hacktegic.com/termux/termux-main: ok
[*] (4) https://grimler.se/termux/termux-main: ok
[*] (1) https://termux.astra.in.ua/apt/termux-main: ok
[*] (1) https://mirror.mwt.me/termux/main: ok
[*] (1) https://mirror.csclub.uwaterloo.ca/termux/termux-main: ok
[*] (1) https://mirror.vern.cc/termux/termux-main: ok
[*] (1) https://mirror.quantum5.ca/termux/termux-main: ok
[*] (4) https://packages.termux.dev/apt/termux-main: ok
[*] (1) https://mirrors.utermux.dev/termux/termux-main: bad
[*] (1) https://mirror.fcix.net/termux/termux-main: ok
[*] (1) https://dl.kcubeterm.com/termux-main: ok
[*] (1) https://plug-mirror.rcac.purdue.edu/termux/termux-main: ok
[*] (1) https://mirrors.wale.id.au/termux/termux-main: ok
[*] (1) http://mirror.mephi.ru/termux/termux-main: ok
[*] (1) https://mirror.surf/termux/termux-main/: ok
Picking mirror: (49) /data/data/com.termux/files/usr/etc/termux/mirrors/north_america/plug-mirror.rcac.purdue.edu
Hit:1 https://its-pointless.github.io/files/21 termux InRelease
Get:2 https://plug-mirror.rcac.purdue.edu/termux/termux-main stable InRelease [14.0 kB]
Get:3 https://plug-mirror.rcac.purdue.edu/termux/termux-root root InRelease [14.2 kB]
Get:4 https://plug-mirror.rcac.purdue.edu/termux/termux-main stable/main arm Packages [484 kB]
Get:5 https://plug-mirror.rcac.purdue.edu/termux/termux-root root/stable arm Packages [19.2 kB]
Fetched 532 kB in 9s (57.7 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
3 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
opencv is already the newest version (4.8.0).
python-torchvision is already the newest version (0.15.1-1).
python-torch is already the newest version (2.0.1).
python-numpy is already the newest version (1.25.1).
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 opencv : Depends: libopenblas but it is not going to be installed
 python-numpy : Depends: libopenblas but it is not going to be installed
 python-torch : Depends: libopenblas but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

~ $ pkg install libopenblas opencv

python-torchvision python-torch python-numpy
Checking availability of current mirror:
[*] https://plug-mirror.rcac.purdue.edu/termux/termux-main: ok
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
opencv is already the newest version (4.8.0).
python-torchvision is already the newest version (0.15.1-1).
python-torch is already the newest version (2.0.1).
python-numpy is already the newest version (1.25.1).
The following package was automatically installed and is no longer required:
  libandroid-spawn
Use 'apt autoremove' to remove it.
The following NEW packages will be installed:
  libopenblas
0 upgraded, 1 newly installed, 0 to remove and 3 not upgraded.
4 not fully installed or removed.
Need to get 0 B/2548 kB of archives.
After this operation, 8622 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 54832 files and directories currently installed.)
Preparing to unpack .../libopenblas_0.3.23_arm.deb ...
Unpacking libopenblas (0.3.23) ...
dpkg: error processing archive /data/data/com.termux/cache/apt/archives/libopenblas_0.3.23_arm.deb (--unpack):
 trying to overwrite '/data/data/com.termux/files/usr/lib/pkgconfig/openblas.pc', which is also in package openblas 0.3.7
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /data/data/com.termux/cache/apt/archives/libopenblas_0.3.23_arm.deb
E: Sub-process /data/data/com.termux/files/usr/bin/dpkg returned an error code (1)

~ $ apt -o Dpkg::Options::="--force-overwrite" install openblas

    Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
openblas is already the newest version (0.3.7).
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 opencv : Depends: libopenblas but it is not going to be installed
 python-numpy : Depends: libopenblas but it is not going to be installed
 python-torch : Depends: libopenblas but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

~ $ apt --fix-broken install

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following package was automatically installed and is no longer required:
  libandroid-spawn
Use 'apt autoremove' to remove it.
The following additional packages will be installed:
  libopenblas
The following NEW packages will be installed:
  libopenblas
0 upgraded, 1 newly installed, 0 to remove and 3 not upgraded.
4 not fully installed or removed.
Need to get 0 B/2548 kB of archives.
After this operation, 8622 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 54832 files and directories currently installed.)
Preparing to unpack .../libopenblas_0.3.23_arm.deb ...
Unpacking libopenblas (0.3.23) ...
dpkg: error processing archive /data/data/com.termux/cache/apt/archives/libopenblas_0.3.23_arm.deb (--unpack):
 trying to overwrite '/data/data/com.termux/files/usr/lib/pkgconfig/openblas.pc', which is also in package openblas 0.3.7
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /data/data/com.termux/cache/apt/archives/libopenblas_0.3.23_arm.deb
E: Sub-process /data/data/com.termux/files/usr/bin/dpkg returned an error code (1)
~ $

What steps will reproduce the bug?

Exicuting any command related to this issue

What is the expected behavior?

To install the openblas

System information

termux-info:

Termux Variables:
TERMUX_API_VERSION=0.50.1
TERMUX_APK_RELEASE=F_DROID
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=24217
TERMUX_IS_DEBUGGABLE_BUILD=0
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.0
Packages CPU architecture:
arm
Subscribed repositories:
# sources.list
deb https://plug-mirror.rcac.purdue.edu/termux/termux-main stable main
# root-repo (sources.list.d/root.list)
deb https://plug-mirror.rcac.purdue.edu/termux/termux-root root stable
# sources.list.d/pointless.list
deb https://its-pointless.github.io/files/21 termux extras
Updatable packages:
cmake/stable 3.26.4-2 arm [upgradable from: 3.26.4-1]
command-not-found/stable 2.2.0-8 arm [upgradable from: 2.2.0-7]
rhash/stable 1.4.4 arm [upgradable from: 1.4.3]
termux-tools version:
1.38.3
Android version:
11
Kernel build information:
Linux localhost 4.4.177-21848546 #1 SMP PREEMPT Wed Jul 13 14:26:29 KST 2022 armv8l Android
Device manufacturer:
samsung
Device model:
SM-A105F
LD Variables:
LD_LIBRARY_PATH=/data/data/com.termux/files/home/.local/lib:
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
Installed termux plugins:
com.termux.api versionCode:51
com.termux.styling versionCode:30
sylirre commented 1 year ago

This is because you have this repository in sources list:

https://its-pointless.github.io/files/21

Remove it and uninstall openblas first before installing libopenblas package. These two are same and conflict with each other.

Note that Its-Pointless repo is no longer maintained.