Open yucho123987 opened 1 year ago
Hi yucho123987.
I'll do the same thing later, so please wait for a while.
Update , Upgrade
$ pkg update $$ upgrade
Install PHP
$ pkg install php php-fpm php-apache
Reconfirm the version you are in
$ dpkg -l | grep php
ii php 8.2.1 aarch64 Server-side, HTML-embedded scripting language
ii php-apache 8.2.1 aarch64 Apache 2.0 Handler module for PHP
ii php-fpm 8.2.1 aarch64 FastCGI Process Manager for PHP
removing php
$ 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
@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
@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.
@yucho123987
OK. Then, I will try the build when I have time, so please wait for a while.
After the installation, I ran
php -v
, it said: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:What should I do? My Termux version: 0.118.0 (From F-Droid) Android version: 9