Điểm:0

About installing .sh Ubuntu 20.04

lá cờ 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
lá cờ us
Câu hỏi của bạn không có chủ đề cho Hỏi Ubuntu. PHP 5.x là EOL.Bạn phải liên hệ với tác giả của tập lệnh vì sẽ có những vấn đề khác.
user535733 avatar
lá cờ cn
Không thể sử dụng tập lệnh đó nữa: Gói `php5` đã bị xóa khỏi Ubuntu sau ngày 14.04 (bảy năm trước).
lá cờ in
Nhìn vào nội dung của `install.sh`, việc chạy các lệnh theo cách thủ công đối với phiên bản PHP hiện tại không quá phức tạp. *có thể* có thể chạy nội dung của thư mục `/public` trên bản cài đặt PHP hiện đại nếu (các) nhà phát triển mã sử dụng các thực tiễn hiện đại và lệnh gọi hàm

Đăng câu trả lời

Hầu hết mọi người không hiểu rằng việc đặt nhiều câu hỏi sẽ mở ra cơ hội học hỏi và cải thiện mối quan hệ giữa các cá nhân. Ví dụ, trong các nghiên cứu của Alison, mặc dù mọi người có thể nhớ chính xác có bao nhiêu câu hỏi đã được đặt ra trong các cuộc trò chuyện của họ, nhưng họ không trực giác nhận ra mối liên hệ giữa câu hỏi và sự yêu thích. Qua bốn nghiên cứu, trong đó những người tham gia tự tham gia vào các cuộc trò chuyện hoặc đọc bản ghi lại các cuộc trò chuyện của người khác, mọi người có xu hướng không nhận ra rằng việc đặt câu hỏi sẽ ảnh hưởng—hoặc đã ảnh hưởng—mức độ thân thiện giữa những người đối thoại.