无法在 ubuntu 上安装 php 8.0,E: 存储库 'https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy Release'没有发布文件
我正在尝试在 vultr 的 Ubuntu 22.04 服务器上安装 LEMP。 我可以安装 Nginx sudo apt install -y nginx
- 没问题。
但是当我尝试通过运行这些命令安装 php8.0 时,
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
我不断收到错误 存储库 'https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy Release' 没有发布文件。
这是运行 sudo add-apt-repository ppa:ondrej/php 命令后得到的结果
root@ubuntu:~# sudo add-apt-repository ppa:ondrej/php
PPA publishes dbgsym, you may need to include 'main/debug' component
Repository: 'deb https://ppa.launchpadcontent.net/ondrej/php/ubuntu/ jammy main'
Description:
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
Adding repository.
Press [ENTER] to continue or Ctrl-c to cancel.
Found existing deb entry in /etc/apt/sources.list.d/ondrej-ubuntu-php-jammy.list
Adding deb entry to /etc/apt/sources.list.d/ondrej-ubuntu-php-jammy.list
Found existing deb-src entry in /etc/apt/sources.list.d/ondrej-ubuntu-php-jammy.list
Adding disabled deb-src entry to /etc/apt/sources.list.d/ondrej-ubuntu-php-jammy.list
Adding key to /etc/apt/trusted.gpg.d/ondrej-ubuntu-php.gpg with fingerprint 14AA40EC0831756756D7F66C4F4EA0AAE5267A6C
Get:1 http://us.clouds.archive.ubuntu.com/ubuntu jammy InRelease [270 kB]
Hit:2 http://security.ubuntu.com/ubuntu jammy-security InRelease
Hit:3 https://ppa.launchpadcontent.net/canonical-kernel-team/unstable/ubuntu jammy InRelease
Hit:4 http://us.clouds.archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:5 http://us.clouds.archive.ubuntu.com/ubuntu jammy-backports InRelease
Get:6 http://us.clouds.archive.ubuntu.com/ubuntu jammy/main amd64 Packages [1,408 kB]
Ign:7 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy InRelease
Get:8 http://us.clouds.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages [14.1 MB]
Err:9 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy Release
404 Not Found [IP: 91.189.95.85 443]
Get:10 http://us.clouds.archive.ubuntu.com/ubuntu jammy/universe Translation-en [5,645 kB]
Get:11 http://us.clouds.archive.ubuntu.com/ubuntu jammy/universe amd64 c-n-f Metadata [286 kB]
Reading package lists... Done
E: The repository 'https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
有什么想法/建议为什么会发生这种情况以及我应该采取什么不同的做法吗?
I am trying to install LEMP on vultr's Ubuntu 22.04 server.
I can install Nginx sudo apt install -y nginx
- no problem.
But when I try to install php8.0 by running these commands
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
I keep getting error The repository 'https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy Release' does not have a Release file.
Here is what I get after running the sudo add-apt-repository ppa:ondrej/php
command
root@ubuntu:~# sudo add-apt-repository ppa:ondrej/php
PPA publishes dbgsym, you may need to include 'main/debug' component
Repository: 'deb https://ppa.launchpadcontent.net/ondrej/php/ubuntu/ jammy main'
Description:
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
Adding repository.
Press [ENTER] to continue or Ctrl-c to cancel.
Found existing deb entry in /etc/apt/sources.list.d/ondrej-ubuntu-php-jammy.list
Adding deb entry to /etc/apt/sources.list.d/ondrej-ubuntu-php-jammy.list
Found existing deb-src entry in /etc/apt/sources.list.d/ondrej-ubuntu-php-jammy.list
Adding disabled deb-src entry to /etc/apt/sources.list.d/ondrej-ubuntu-php-jammy.list
Adding key to /etc/apt/trusted.gpg.d/ondrej-ubuntu-php.gpg with fingerprint 14AA40EC0831756756D7F66C4F4EA0AAE5267A6C
Get:1 http://us.clouds.archive.ubuntu.com/ubuntu jammy InRelease [270 kB]
Hit:2 http://security.ubuntu.com/ubuntu jammy-security InRelease
Hit:3 https://ppa.launchpadcontent.net/canonical-kernel-team/unstable/ubuntu jammy InRelease
Hit:4 http://us.clouds.archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:5 http://us.clouds.archive.ubuntu.com/ubuntu jammy-backports InRelease
Get:6 http://us.clouds.archive.ubuntu.com/ubuntu jammy/main amd64 Packages [1,408 kB]
Ign:7 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy InRelease
Get:8 http://us.clouds.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages [14.1 MB]
Err:9 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy Release
404 Not Found [IP: 91.189.95.85 443]
Get:10 http://us.clouds.archive.ubuntu.com/ubuntu jammy/universe Translation-en [5,645 kB]
Get:11 http://us.clouds.archive.ubuntu.com/ubuntu jammy/universe amd64 c-n-f Metadata [286 kB]
Reading package lists... Done
E: The repository 'https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Any thoughts / suggestions why this is happening and what should I do differently?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是22.10的结果尚未发布的问题 ppa:ondrej/php 存储库。它将通过 ppa:ondrej/php 修复它,但我已经找到了解决方案,我认为这不是最好的解决方案,
然后添加此行并保存,
然后尝试再次安装
PHP 7.2< /strong>
PHP 8.0
对于这个答案我已经帮助了这些link_01 link_02
现在已成功安装 PHP,因此您可以轻松切换 PHP 版本,
选择输入数字的版本,现在检查PHP版本
It is the issue of the result of 22.10 not being released yet ppa:ondrej/php repository. It will fix it by ppa:ondrej/php, but I have found a solution for this,i don't think it is the best solution,
then add this line and save it
then try to install it again
PHP 7.2
PHP 8.0
for this answer i have helped these link_01 link_02
now successfully installed PHP, so you can switch easily the PHP version,
select the version for enter the number, now check the PHP version