I'm trying to install this file .sh https://github.com/greatfire/website-mirror-by-proxy/tree/master/install
I used these command line
chmod +x install.sh
sudo ./install.sh
after that it show me those lines
Building dependency tree
Reading state information... Done
Package php5 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'php5' has no installation candidate
Installing HTTP extension
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libcurl4-openssl-dev' instead of 'libcurl3-openssl-dev'
Package php5-mcrypt is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Unable to locate package php5-dev
E: Package 'php5-mcrypt' has no installation candidate
./install.sh: line 3: pecl: command not found
tee: /etc/php5/mods-available/raphf.ini: No such file or directory
extension=raphf.so
./install.sh: line 5: php5enmod: command not found
./install.sh: line 3: pecl: command not found
tee: /etc/php5/mods-available/propro.ini: No such file or directory
extension=propro.so
./install.sh: line 5: php5enmod: command not found
./install.sh: line 3: pecl: command not found
tee: /etc/php5/mods-available/http.ini: No such file or directory
extension=http.so
./install.sh: line 5: php5enmod: command not found
Enabling Apache modules
Module rewrite already enabled
I trayed to install php5 but I have php7!
Is there any way to install this file?
I have Update here:
I make some editions to make it be compatible with v20.04 (php 7.4 )
#!/bin/bash
function pecl_install {
pecl install $1
echo "extension=$2.so" | sudo tee /etc/php/7.4/mods-available/$2.ini
echo "; priority=$3" | sudo tee -a /etc/php/7.4/mods-available/$2.ini
php7enmod $2
}
if [ $(/usr/bin/id -u) -ne 0 ]; then
echo "Not running as root"
exit
fi
echo "Installing Apache and PHP"
apt-get install apache2 php7.4 php7.4-curl
echo "Installing HTTP extension"
apt-get install libpcre3-dev libcurl3-openssl-dev php7.4-dev php-http php7.4-mcrypt>
pecl_install pecl/raphf raphf 20
pecl_install pecl/propro propro 20
pecl_install pecl_http http 30
echo "Enabling Apache modules"
a2enmod proxy
a2enmod proxy_http
a2enmod rewrite
But I still have a problem with line number 18
THIS LINE:
apt-get install libpcre3-dev libcurl3-openssl-dev php7.4-dev php-http php7.4-mcrypt>
So, Any solution here? to be able to install "TTP extension"!!