termux-pacman / pacman-for-termux

Special configured pacman for termux.
https://termux-pacman.dev
MIT License
64 stars 6 forks source link

Error running post-transaction hooks #7

Closed Maxython closed 2 years ago

Maxython commented 2 years ago

When installing packages using post-transaction, there is a chance that there will be an error.
Example of installing ca-certificates-utils:

[u0_a494@localhost test]$ pacman -S ca-certificates-utils
warning: ca-certificates-utils-20210603-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) ca-certificates-utils-20210603-1

Total Installed Size:  0.01 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring                     [####] 100%
(1/1) checking package integrity                   [####] 100%
(1/1) loading package files                        [####] 100%
(1/1) checking for file conflicts                  [####] 100%
(1/1) checking available disk space                [####] 100%
:: Processing package changes...
/data/data/com.termux/files/usr/bin/dash: 2: cannot open 0: No such file
(1/1) reinstalling ca-certificates-utils           [####] 100%
:: Running post-transaction hooks...
(1/1) Rebuilding certificate stores...
trust: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
trust: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
trust: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
trust: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
trust: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
trust: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
trust: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
find: error while loading shared libraries: libm.so.6: cannot open shared object file: No such file or directory
error: command failed to execute correctly

The reason for the error is that if you replace the commands from arch, then some need to run with the asl command.

Maxython commented 2 years ago

Another example with nano, but already a problem with /bin/sh.

[u0_a494@localhost ~]$ pacman -S nano                        
warning: nano-5.8-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) nano-5.8-1

Total Installed Size:  2.45 MiB
Net Upgrade Size:      0.00 MiB                               
:: Proceed with installation? [Y/n] y                         
(1/1) checking keys in keyring                     [####] 100%
(1/1) checking package integrity                   [####] 100%
(1/1) loading package files                        [####] 100%
(1/1) checking for file conflicts                  [####] 100%
(1/1) checking available disk space                [####] 100%
:: Processing package changes...                              
(1/1) reinstalling nano                            [####] 100%
:: Running post-transaction hooks...                          
(1/2) Arming ConditionNeedsUpdate...
/bin/sh: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
error: command failed to execute correctly
(2/2) Updating the info directory file...                     
/bin/sh: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
error: command failed to execute correctly
Maxython commented 2 years ago

lib/libalpm/util.c:660 or
lib/libalpm/trans.c:397/400

Maxython commented 2 years ago

There are some successes, but I think it can be even better.