私はUbuntu 14.04とPHP 7.0を使用しています。 PHPをPHP 7.4にアップデートする必要があります。ppa:ondrej/php
リポジトリを追加しました。それでもUnable to locate package php7.4
PHPを更新しようとすると、メッセージが表示されます。
$ sudo add-apt-repository ppa:ondrej/php
Co-installable PHP versions: PHP 5.6, PHP 7.x and most requested extensions are included. Only Supported Versions of PHP (http://php.net/supported-versions.php) for Supported Ubuntu Releases (https://wiki.ubuntu.com/Releases) are provided. Don't ask for end-of-life PHP versions or Ubuntu release, they won't be provided.
Debian oldstable and stable packages are provided as well: https://deb.sury.org/#debian-dpa
You can get more information about the packages at https://deb.sury.org
IMPORTANT: The <foo>-backports is now required on older Ubuntu releases.
BUGS&FEATURES: This PPA now has a issue tracker:
https://deb.sury.org/#bug-reporting
CAVEATS:
1. If you are using php-gearman, you need to add ppa:ondrej/pkg-gearman
2. If you are using apache2, you are advised to add ppa:ondrej/apache2
3. If you are using nginx, you are advised to add ppa:ondrej/nginx-mainline
or ppa:ondrej/nginx
PLEASE READ: If you like my work and want to give me a little motivation, please consider donating regularly: https://donate.sury.org/
WARNING: add-apt-repository is broken with non-UTF-8 locales, see
https://github.com/oerdnj/deb.sury.org/issues/56 for workaround:
# LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
More info: https://launchpad.net/~ondrej/+archive/ubuntu/php
Press [ENTER] to continue or ctrl-c to cancel adding it
gpg: keyring `/tmp/tmpayt67sik/secring.gpg' created
gpg: keyring `/tmp/tmpayt67sik/pubring.gpg' created
gpg: requesting key E5267A6C from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpayt67sik/trustdb.gpg: trustdb created
gpg: key E5267A6C: public key "Launchpad PPA for Ondřej Surý" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
OK
$ sudo apt update
Ign http://ap-southeast-1.ec2.archive.ubuntu.com trusty InRelease
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-updates InRelease
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-backports InRelease
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty Release.gpg
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty Release
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-updates/main Sources
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-updates/restricted Sources
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-updates/universe Sources
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-updates/multiverse Sources
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-updates/main amd64 Packages
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-updates/restricted amd64 Packages
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-updates/universe amd64 Packages
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-updates/multiverse amd64 Packages
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-updates/main Translation-en
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-updates/multiverse Translation-en
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-updates/restricted Translation-en
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-updates/universe Translation-en
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-backports/main Sources
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-backports/restricted Sources
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-backports/universe Sources
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-backports/multiverse Sources
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-backports/main amd64 Packages
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-backports/restricted amd64 Packages
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-backports/universe amd64 Packages
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-backports/multiverse amd64 Packages
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-backports/main Translation-en
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-backports/multiverse Translation-en
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-backports/restricted Translation-en
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty-backports/universe Translation-en
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty/main Sources
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty/restricted Sources
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty/universe Sources
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty/multiverse Sources
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty/main amd64 Packages
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty/restricted amd64 Packages
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty/universe amd64 Packages
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty/multiverse amd64 Packages
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty/main Translation-en
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty/multiverse Translation-en
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty/restricted Translation-en
Hit http://ap-southeast-1.ec2.archive.ubuntu.com trusty/universe Translation-en
Ign http://ap-southeast-1.ec2.archive.ubuntu.com trusty/main Translation-en_US
Ign http://ap-southeast-1.ec2.archive.ubuntu.com trusty/multiverse Translation-en_US
Ign http://ap-southeast-1.ec2.archive.ubuntu.com trusty/restricted Translation-en_US
Ign http://ap-southeast-1.ec2.archive.ubuntu.com trusty/universe Translation-en_US
Hit http://ppa.launchpad.net trusty InRelease
Hit http://security.ubuntu.com trusty-security InRelease
Hit http://security.ubuntu.com trusty-security/main Sources
Hit http://ppa.launchpad.net trusty/main amd64 Packages
Hit http://security.ubuntu.com trusty-security/universe Sources
Hit http://ppa.launchpad.net trusty/main Translation-en
Hit http://security.ubuntu.com trusty-security/main amd64 Packages
Hit http://security.ubuntu.com trusty-security/universe amd64 Packages
Hit http://security.ubuntu.com trusty-security/main Translation-en
Hit http://security.ubuntu.com trusty-security/universe Translation-en
Reading package lists... Done
$ sudo apt install php7.4
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 regex 'php7.4'
この問題の原因は何ですか?Ubuntu 14.04にPHP 7.4をインストールする方法は?
答え1
リポジトリの説明では:
サポートされているPHPバージョン(http://php.net/supported-versions.php)サポートされているUbuntuバージョン(https://wiki.ubuntu.com/Releases)供給。廃止されたPHPバージョンまたはUbuntuバージョンを要求しないでください。提供されません。
Ubuntu 14.04のサポートは2019年4月に終了したため、リポジトリに14.04用のパッケージが含まれておらず、PHP 7.4をインストールできません。古いUbuntuバージョンの新しいPHPの他のソースを知らないため、手動でインストールするか、サポートされている最新のUbuntuバージョンにアップグレードする必要があるかもしれません。