简体   繁体   English

为旧的 ubuntu 版本 (14) 和 php 7.0 添加-apt-repository ondrej/php

[英]add-apt-repository ondrej/php for old ubuntu versions (14) and php 7.0

when you run the command当你运行命令时

sudo add-apt-repository ppa:ondrej/php

you get:你得到:

Only Supported Versions of PHP ( http://php.net/supported-versions.php ) for Supported Ubuntu Releases ( https://wiki.ubuntu.com/Releases ) are provided.仅提供支持的 Ubuntu 版本 ( https://wiki.ubuntu.com/Releases ) 的 PHP 支持版本 ( http://php.net/supported-versions.php )。 Don't ask for end-of-life PHP versions or Ubuntu release, they won't be provided.不要要求终止生命周期的 PHP 版本或 Ubuntu 版本,它们不会被提供。

both, php 7.0 and ubuntu 14 are dead aka end of life. php 7.0 和 ubuntu 14 都死了,也就是生命的尽头。 So ubuntu 14 is dead since april 2019 and php7.0 is dead too for a while now I guess所以 ubuntu 14 自 2019 年 4 月起就死了,php7.0 现在也死了一段时间了,我猜

running:跑步:

sudo apt-get install php7.0-gd returns: sudo apt-get install php7.0-gd返回:

Reading package lists... Done Building dependency tree正在阅读包列表...完成构建依赖树
Reading state information... Done Package php7.0-gd is not available, but is referred to by another package.正在读取状态信息... 完成 包 php7.0-gd 不可用,但被另一个包引用。 This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'php7.0-gd' has no installation candidate这可能意味着该软件包丢失、已过时或只能从其他来源获得 E: Package 'php7.0-gd' 没有安装候选

so, what now?所以现在怎么办? I have to create a new server with latest ubuntu version to get that php library installed, or is there a different way?我必须使用最新的 ubuntu 版本创建一个新服务器才能安装该 php 库,还是有不同的方法?

and: just upgrade to php7.1 7.2 or 7.3: no that wont work either as they are not available either under ubuntu 14.并且:只需升级到 php7.1 7.2 或 7.3:不,这也不起作用,因为它们在 ubuntu 14 下也不可用。

ideas?想法?

Unfortunately you won't be able to use ondrej's repositories on EOL'd ubuntu versions. 不幸的是,您将无法在EOL的ubuntu版本上使用ondrej的存储库。

I would strongly consider upgrading if possible, however you can always build the extension from source and install it manually. 我会尽可能考虑升级,但是您始终可以从源代码构建扩展并手动安装。

For example, here's an answer for compiling php-gd for php5, but you should be able to adapt it for your version: 例如,这是为php5编译php-gd的答案,但是您应该能够将其适应您的版本:

PHP GD bundled extension without recompiling PHP - solution PHP GD捆绑扩展,无需重新编译PHP-解决方案

add-apt-repository is a Python script that allows you to add an APT repository to either /etc/apt/sources.list or to a separate file in the /etc/apt/sources.list.d directory. add-apt-repository是一个 Python 脚本,允许您将 APT 存储库添加到/etc/apt/sources.list/etc/apt/sources.list.d目录中的单独文件。 The command can also be used to remove an already existing repository.该命令还可用于删除已存在的存储库。

If the add-apt-repository is not available on your system you will get an error message saying如果add-apt-repository在您的系统上不可用,您将收到一条错误消息,指出

add-apt-repository command not found找不到 add-apt-repository 命令

The add-apt-repository utility is included in the software-properties-common package. add-apt-repository实用程序包含在software-properties-common包中。 To install it run the following commands:要安装它,请运行以下命令:

$ sudo apt update
$ sudo apt install software-properties-common

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM