Score:0

About installing .sh Ubuntu 20.04

ธง br

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
คำถามของคุณนอกหัวข้อสำหรับ Ask Ubuntu PHP 5.x คือ EOLคุณต้องติดต่อผู้เขียนสคริปต์เนื่องจากจะมีปัญหาอื่น ๆ
user535733 avatar
cn flag
ใช้สคริปต์นั้นไม่ได้อีกต่อไป: แพ็คเกจ `php5` ถูกลบออกจาก Ubuntu หลังจาก 14.04 (เจ็ดปีที่แล้ว)
in flag
เมื่อดูเนื้อหาของ `install.sh` แล้ว การเรียกใช้คำสั่งด้วยตนเองสำหรับ PHP เวอร์ชันปัจจุบันนั้นไม่ซับซ้อนอย่างไม่น่าเชื่อ *อาจ* เป็นไปได้ที่จะเรียกใช้เนื้อหาของไดเร็กทอรี `/public` ในการติดตั้ง PHP สมัยใหม่ หากผู้พัฒนาโค้ดใช้วิธีปฏิบัติที่ทันสมัยและการเรียกฟังก์ชัน

โพสต์คำตอบ

คนส่วนใหญ่ไม่เข้าใจว่าการถามคำถามมากมายจะปลดล็อกการเรียนรู้และปรับปรุงความสัมพันธ์ระหว่างบุคคล ตัวอย่างเช่น ในการศึกษาของ Alison แม้ว่าผู้คนจะจำได้อย่างแม่นยำว่ามีคำถามกี่ข้อที่ถูกถามในการสนทนา แต่พวกเขาไม่เข้าใจความเชื่อมโยงระหว่างคำถามและความชอบ จากการศึกษาทั้ง 4 เรื่องที่ผู้เข้าร่วมมีส่วนร่วมในการสนทนาด้วยตนเองหรืออ่านบันทึกการสนทนาของผู้อื่น ผู้คนมักไม่ตระหนักว่าการถามคำถามจะมีอิทธิพลหรือมีอิทธิพลต่อระดับมิตรภาพระหว่างผู้สนทนา