Termux said:
'CANNOT LINK EXECUTABLE "php": library "libgnutls.so" not found'
Somebody please help
My system:
Packages CPU architecture:
aarch64
Subscribed repositories:
sources.list
deb //termux.org/packages/ stable main
science-repo [sources.list.d/science.list]
deb //dl.bintray.com/grimler/science-packages-24 science stable
game-repo [sources.list.d/game.list]
deb //dl.bintray.com/grimler/game-packages-24 games stable
Updatable packages:
apt/stable 1.4.9-27 aarch64 [upgradable from: 1.4.9-25]
bash/stable 5.0.17
aarch64 [upgradable from: 5.0.11]
busybox/stable 1.31.1-10 aarch64 [upgradable from: 1.31.1-6]
command-not-found/stable 1.52 aarch64 [upgradable from: 1.47]
coreutils/stable 8.32-1 aarch64 [upgradable from: 8.31-8]
curl/stable 7.70.0-1 aarch64 [upgradable from: 7.68.0]
dash/stable 0.5.11 aarch64 [upgradable from: 0.5.10.2-2]
dpkg/stable 1.20.0-3 aarch64 [upgradable from: 1.19.7-9]
ed/stable 1.16 aarch64 [upgradable from: 1.15]
game-repo/stable 1.2 all [upgradable
from: 1.1]
gawk/stable 5.1.0 aarch64 [upgradable from: 5.0.1-4]
gpgv/stable 2.2.20-3 aarch64 [upgradable from: 2.2.19]
gzip/stable 1.10-3 aarch64 [upgradable from: 1.10-2]
inetutils/stable 1.9.4-9 aarch64 [upgradable from: 1.9.4-8]
libandroid-support/stable 26 aarch64 [upgradable from: 25-2]
libcurl/stable 7.70.0-1 aarch64 [upgradable from: 7.68.0]
libgpg-error/stable 1.38 aarch64 [upgradable from: 1.36-1]
liblzma/stable 5.2.5-1 aarch64 [upgradable from:
5.2.4-7]
libnghttp2/stable 1.41.0 aarch64 [upgradable from: 1.40.0]
ncurses/stable 6.2.20200222 aarch64 [upgradable from: 6.1.20190928]
openssl/stable 1.1.1g-2 aarch64 [upgradable from: 1.1.1d-1]
pcre/stable 8.44 aarch64 [upgradable from: 8.43-5]
procps/stable 3.3.16-2 aarch64 [upgradable from: 3.3.16]
readline/stable 8.0.4 aarch64 [upgradable from: 8.0.1]
science-repo/stable 1.1 all [upgradable from: 1.0]
termux-exec/stable 0.5 aarch64 [upgradable from:
0.4-1]
termux-keyring/stable 1.4 all [upgradable from: 1.2]
termux-tools/stable 0.81-3 all [upgradable from: 0.74]
util-linux/stable 2.35.2 aarch64 [upgradable from: 2.35.1]
xz-utils/stable 5.2.5-1 aarch64 [upgradable from: 5.2.4-7]
Android version:
9
Kernel build information:
Linux localhost 4.14.98-perf+
#2 SMP PREEMPT Sun Apr 12 20:01:34 CST 2020 aarch64 Android
Device manufacturer:
OPPO
Device model:
CPH1931
PHP is a server scripting language and a powerful tool for making dynamic and interactive Web pages.
With PHP, you can connect and manipulate databases.
MySQL is the most popular database system used with PHP.
If you're interested to learn PHP and SQL, but don't have a computer. Don't worry!
In this article, we are going to talk about how to learn PHP and SQL using Termux on your Android.
So, let's begin!
First of, we need to install the latest version of Termux and the latest version is 0.118.0
The latest version is not available in the Google Play Store. So, we will install it from F-Droid.
Because, Termux's official website recommends installing the latest version of Termux from F-Droid. As you can see in the picture below.
So, just go to F-Droid. You will see the F-Droid website as below. Now scroll down and click on the 'Download F-DROID' button to install F-Droid. Then we will be able to install the latest version of Termux.
You need to install F-Droid after downloading. Then, we will open it. After that, we will search Termux on Fdroid as below.
Then, click on Termux. As you can see in the picture above. Now install the latest version of Termux.
After installing Termux type the following commands one by one and press enter after typing each command...
- apt update command lets your system know which packages are available for upgrade, and where the software needs to be restored.
- apt upgrade -y can then act on this information and upgrade all installed packages to their latest versions.
- termux-setup-storage to allow Termux to access photos, media and files on your device.
- pkg install php to install the latest version of PHP.
- pkg install nano It's a editor. You can edit PHP file by this nano editor.
- nano filename.php to open a PHP file. Then, you can write PHP code to this file.
- php filename.php to run this PHP file.
So, we've installed PHP. Similarly, we can install SQL on our Android to retrieve data from database.
Data retrieval is the use of SQL as a data query language to display data from a database table. The data query language is used to query the required data from the database.
Now, let me show you how to install SQL on our Android.
Open the Termux again. If you've already installed PHP type the following commands one by one and press enter after typing each command...
- pkg install mariadb To install mysql. Mysql and Mariadb are the same thing.
- mysqld_safe -u root &
- mysql To run the mysql.
- CREATE DATABASE database_name; To create database.
- SHOW DATABASES; To show a list of databases.
- USE database_name; To run the database.
- CREATE TABLE table_name [id int[5], Name varchar[20], Email varchar[50]]; Data is defined using SQL through CREATE statement.
- SHOW TABLES; To show a list of tables in the database.
- INSERT INTO table_name [id, Name, Email] VALUES[1, "Your name", "email address"]; The INSERT command is used to enter one or more records.
- SELECT id, Name, Email FROM table_name; The SELECT statement is used to search the required information from the database. Data manipulation can be done using many more clauses with SELECT statement.
- UPDATE table_name SET Name = "Another name" WHERE Name = "Previous name"; The UPDATE command is used to update one or more records from the database.
- DELETE table_name WHERE Name="previous name"; The DELETE command is used to delete one or more records from database.
Let's Conclude
This is an article about learning PHP and SQL on your smartphone using Temux. Now you can learn PHP and SQL using just a smartphone. There are also many PHP and SQL tutorials available on the Internet.
Mohammad Rahi
Junior frontend developer. YouTube: //www.youtube.com/channel/UCl8lvktLJpmGPsCIAAeePYQ