1
$ apt install git
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libandroid-support libiconv pcre2
The following NEW packages will be installed:
  git libiconv pcre2
The following packages will be upgraded:
  libandroid-support
1 upgraded, 3 newly installed, 0 to remove and 20 not upgraded.
Need to get 0 B/3804 kB of archives.                    After this operation, 19.1 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y                        CANNOT LINK EXECUTABLE "dpkg-deb": library "liblzma.so.5" not found
dpkg: error processing archive /data/data/com.termux/files/usr/var/cache/apt/archives/libandroid-support_24-6_aarch64.deb (--unpack):                                    dpkg-deb --control subprocess was killed by signal (Aborted)
Errors were encountered while processing:                /data/data/com.termux/files/usr/var/cache/apt/archives/libandroid-support_24-6_aarch64.deb
E: Sub-process /data/data/com.termux/files/usr/bin/dpkg returned an error code (1)

2 Answers 2

1

I've finally fixed this issue

I had to run;

find ../ -name "liblzma.so*"

and I found there's a liblzma.so in ../usr/lib/liblzma.so I copied it like this

cp ../usr/lib/liblzma.so ../usr/lib/liblzma.so.5

and then installed liblzma with apt to make sure it won't cause future problems.
it works now!
if you need liblzma.so, I've uploaded it here: https://cagriari.com/liblzma.so

note: sorry for formatting, I'm writing this from mobile

1
  • Thank you for your suggestion. I'm not sure exactly how I lost it, but I had to copy it to liblzma.so.5 to make apt work again. I'm sure installing the liblzma package will also get it to update the file. Jul 15, 2019 at 12:15
0

Not sure if this will help or not, but I uninstalled and reinstalled termux, and it seemed to fix the issue. I kept getting that error when trying to upgrade/install almost everything.

1
  • Yes, that actually worked. Anyway, it was such a silly fix... May 31, 2019 at 13:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .