您好
學習在Virtualmin安裝多個PHP版本,安裝失敗後,想請教大家!
目前環境是 :
Ubuntu Linux 18.04.6
Webmin version 2.111
Virtualmin version 7.10.0
(補充 : Apache Webserver)
. step1
sudo apt update
sudo apt upgrade -y
. step2 添加 PHP PPA
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
. step3 配置 PHP-FPM 池
安装多个 PHP 版本,例如 PHP 7.4 和 PHP 8.0:
sudo apt install php7.4 php7.4-cli php7.4-fpm php7.4-mysql
sudo apt install php8.0 php8.0-cli php8.0-fpm php8.0-mysql
```
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php7.4
E: Couldn't find any package by glob 'php7.4'
E: Couldn't find any package by regex 'php7.4'
E: Unable to locate package php7.4-cli
E: Couldn't find any package by glob 'php7.4-cli'
E: Couldn't find any package by regex 'php7.4-cli'
E: Unable to locate package php7.4-fpm
E: Couldn't find any package by glob 'php7.4-fpm'
E: Couldn't find any package by regex 'php7.4-fpm'
E: Unable to locate package php7.4-mysql
E: Couldn't find any package by glob 'php7.4-mysql'
E: Couldn't find any package by regex 'php7.4-mysql'
請大家幫幫忙,或是給教學文件,先在這謝謝您的幫忙!!!
我是使用這個庫
sudo add-apt-repository ppa:ondrej/php
然後安裝PHP則是用如下的寫法。只要改前面的版本號就行了。
sudo apt install php7.4-{fpm,common,mysql,xml,xmlrpc,curl,gd,imagick,cli,dev,imap,mbstring,opcache,soap,zip,intl,bcmath} -y
你的錯誤訊息很像是庫不存在或是包不在。
換我這個試試。前幾天剛裝一台還可以用。
且它有php8.3了。
謝謝您!
您好
php7.4 及 php8.3 都失敗,
請問檢查的地方嗎? 想一步一步檢測哪裡出錯了
謝謝!
‵‵‵
root@testphp:/home/ubuntu# sudo apt install php8.3-{fpm,common,mysql,xml,xmlrpc,curl,gd,imagick,cli,dev,imap,mbstring,opcache,soap,zip,intl,bcmath} -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php8.3-fpm
E: Couldn't find any package by glob 'php8.3-fpm'
E: Couldn't find any package by regex 'php8.3-fpm'
E: Unable to locate package php8.3-common
E: Couldn't find any package by glob 'php8.3-common'
E: Couldn't find any package by regex 'php8.3-common'
E: Unable to locate package php8.3-mysql
‵‵‵