简体   繁体   中英

Upgrade PHP 5.6 to 7.2

I currently have php72 installed on amazon linux one.

[ehost ~]$ php -v
PHP 7.2.11 (cli) (    built: Oct 16     2018 23:50:44) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c)     1998-2018 Zend Technologies

When I attempt to install a custom rpm I get the following.

How do I let the rpm know that PHP 7.2 is already installed?

Error: Package: mct_console-3.40.1- 6624_f7150d48.noarch (/mct_console- 3.40.1-6624_f7150d48.noarch) Requires: php >= 7.0.2 Available: php-5.3.29- 1.8.amzn1.x86_64 (amzn-main)

Another Error:

Error: Package: mct_console-3.40.1- 6624_f7150d48.noarch (/mct_console- 3.40.1-6624_f7150d48.noarch) Requires: php-mysql >= 7.0.2 Available: php-mysql-5.3.29- 1.8.amzn1.x86_64 (amzn-main)

The packages php and php72 are two separate packages. You have one called php but it's only 5.3.29. If that's your only dependency that is missing, you can do rpm -i --nodeps to get around it.

However, whatever tool you are trying to install will need to have the PATH fixed in whatever you are currently doing it to change the default php executable to be the 7.2 one.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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