take-i / termux-php7

0 stars 0 forks source link

Got errors while running php -v #2

Open yucho123987 opened 1 year ago

yucho123987 commented 1 year ago

After the installation, I ran php -v, it said:

CANNOT LINK EXECUTABLE "php": library "libssl.so.1.1" not found

I tried to rename the lib according to the error message, but it still showed a similar error. Finally I renamed all libs shown in all error messages and ran php -v again, it said:

CANNOT LINK EXECUTABLE "php": cannot find "libcrypto.so.1.1" from verneed[3] in DT_NEEDED list for "/data/data/com.termux/files/usr/bin/php"

What should I do? My Termux version: 0.118.0 (From F-Droid) Android version: 9

take-i commented 1 year ago

Hi yucho123987.

I'll do the same thing later, so please wait for a while.

take-i commented 1 year ago

I checked if it would be reproduced

$ apt purge php php-apache php-fpm
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  apache2 apr apr-util fontconfig freetype giflib libaom libdav1d libde265 libgd libheif libicu libjpeg-turbo libpng librav1e
  libtiff libwebp libx265 libxslt libzip oniguruma openssl-1.1 tidy ttf-dejavu zstd
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
  php* php-apache* php-fpm*
0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
After this operation, 83.7 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 23213 files and directories currently installed.)
Removing php-apache (8.2.1) ...
Removing php-fpm (8.2.1) ...
Removing php (8.2.1) ...
(Reading database ... 22822 files and directories currently installed.)
Purging configuration files for php (8.2.1) ...
Purging configuration files for php-fpm (8.2.1) ...
wget https://github.com/take-i/termux-php7/raw/master/php_7.4.21-aarch64-deb.zip
unzip php_7.4.21-aarch64-deb.zip
cd php_7.4.21-aarch64-deb/
rm php-pgsql*
dpkg -i ./php* ./libicu_67.1_aarch64.deb
$ dpkg -l | egrep "php|libicu"
egrep: warning: egrep is obsolescent; using grep -E
ii  libicu                     67.1           aarch64      International Components for Unicode library
ii  php                        7.4.21         aarch64      Server-side, HTML-embedded scripting language
ii  php-apache                 7.4.21         aarch64      Apache 2.0 Handler module for PHP
ii  php-fpm                    7.4.21         aarch64      FastCGI Process Manager for PHP
$ which php
/data/data/com.termux/files/usr/bin/php

$ php -v
CANNOT LINK EXECUTABLE "php": library "libssl.so.1.1" not found: needed by main executable
take-i commented 1 year ago

@yucho123987

Hi, yucho123987.

Why don't you operate PHP8.x? I think PHP7.x is already old, upgrade and operation.

apt purge php php-apache php-fpm
pkg install php php-fpm php-apache

$ php -v
PHP 8.2.1 (cli) (built: Jan  5 2023 22:45:34) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.1, Copyright (c) Zend Technologies
$ termux-info
Termux Variables:
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://packages.termux.dev/apt/termux-main/ stable main
Updatable packages:
All packages up to date
termux-tools version:
1.35.0
Android version:
12
Kernel build information:
Linux localhost 4.19.157-perf+ #1 SMP PREEMPT Wed Nov 9 18:02:13 JST 2022 aarch64 Android
Device manufacturer:
Sony
Device model:
XQ-BT44
take-i commented 1 year ago

Memo

yucho123987 commented 1 year ago

@yucho123987

Hi, yucho123987.

Why don't you operate PHP8.x? I think PHP7.x is already old, upgrade and operation.

apt purge php php-apache php-fpm
pkg install php php-fpm php-apache

$ php -v
PHP 8.2.1 (cli) (built: Jan  5 2023 22:45:34) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.1, Copyright (c) Zend Technologies
$ termux-info
Termux Variables:
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://packages.termux.dev/apt/termux-main/ stable main
Updatable packages:
All packages up to date
termux-tools version:
1.35.0
Android version:
12
Kernel build information:
Linux localhost 4.19.157-perf+ #1 SMP PREEMPT Wed Nov 9 18:02:13 JST 2022 aarch64 Android
Device manufacturer:
Sony
Device model:
XQ-BT44

Because I can't stand warnings when using old php softwares.

take-i commented 1 year ago

@yucho123987

OK. Then, I will try the build when I have time, so please wait for a while.