Score:0

About installing .sh Ubuntu 20.04

br flag

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"!!

Paul avatar
us flag
Your question is off-topic for Ask Ubuntu. PHP 5.x is EOL. You have to contact the author of the script as there will be other problems.
user535733 avatar
cn flag
Not possible anymore using that script: The `php5` package was removed from Ubuntu after 14.04 (seven years ago).
in flag
Looking at the contents of `install.sh`, it's not incredibly complicated to run the commands manually for the current version of PHP. It *may* be possible to run the contents of the `/public` directory on a modern PHP installation if the developer(s) of the code used the modern practices and function calls
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.