简体   繁体   English

适用于Ubuntu 14.04 Trusty的PHP 5.6存储库URL

[英]PHP 5.6 Repository URL for Ubuntu 14.04 Trusty

I have PHP 5.6.18-1+deb.sury.org~trusty+1 and am trying to update to 5.6.19. 我有PHP 5.6.18-1 + deb.sury.org〜trusty + 1,正在尝试更新到5.6.19。 However, when I do apt-get update && apt-get upgrade, PHP does not get updated. 但是,当我执行apt-get update和&& apt-get upgrade时,PHP不会得到更新。

I have tried add-apt-repository ppa:ondrej/php5-5.6 as well as manually adding in deb http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu trusty main to my sources.list file to no avail. 我尝试了add-apt-repository ppa:ondrej/php5-5.6以及手动将deb http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu trusty main添加到我的sources.list文件中,但无济于事。

How can I update PHP to 5.6.19 and make sure I don't run into this problem again in the future? 如何将PHP更新到5.6.19,并确保以后不再遇到此问题?

The ppa:ondrej/php5-5.6 repository is discontinued in favour of just ppa:ondrej/php . ppa:ondrej/php5-5.6存储库已停产,而仅使用ppa:ondrej/php At the time of writing, this gives me an up-to-date version of PHP 5.6: 在撰写本文时,这为我提供了PHP 5.6的最新版本:

php --version
PHP 5.6.27-1+deb.sury.org~trusty+1

Note that, once you've added the repository, you'll need to uninstall any packages beginning php5* and reinstall php5.6* equivalents; 请注意,一旦添加了存储库,您将需要卸载所有以php5*开头的软件包,然后重新安装php5.6*等效版本。 also, you will probably have to switch Apache modules. 同样,您可能必须切换Apache模块。 More information on some of the steps required on this blogpost . 有关此博客文章要求的某些步骤的更多信息。

Note that, because of the quirk of the package maintainer's name containing a non-ASCII character, you might also need to install eg language-pack-en to fix all your server locales first. 注意,由于软件包维护者的名字包含一个非ASCII字符,因此您可能还需要安装例如language-pack-en来首先修复所有服务器语言环境。 There's some other suggestions of what to do on this ServerFault question but for me it was trivial to install the language pack and let that take care of all locale settings. 关于此ServerFault问题 ,还有其他建议,但是对我来说,安装语言包并让它负责所有语言环境设置很简单。

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

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