[英]CentOS 7 - Impossible to install PHP 7.3
I want to enable php73 as default version and install all packages related to it.我想启用php73作为默认版本并安装与之相关的所有软件包。 So I did:
所以我做了:
$ sudo yum-config-manager --enable remi-php73
And then:进而:
$ sudo yum install php php-pecl-mcrypt php-cli php-gd php-curl php-mysqlnd php-ldap php-zip php-fileinfo php-common php-xml php-fpm php-mbstring php-bcmath php-soap php-oci8
Right after, I can see that it wants to install PHP 8.0 ( remi-php80 , which breaks my project dependencies):紧接着,我可以看到它想要安装PHP 8.0 ( remi-php80 ,这打破了我的项目依赖):
Dependencies Resolved
======================================================================================================
Package Arch Version Repository Size
======================================================================================================
Installing:
php x86_64 8.0.0~beta4-2.el7.remi remi-php80 3.4 M
Installing for dependencies:
php-cli x86_64 8.0.0~beta4-2.el7.remi remi-php80 5.3 M
php-common x86_64 8.0.0~beta4-2.el7.remi remi-php80 1.2 M
php-sodium x86_64 8.0.0~beta4-2.el7.remi remi-php80 74 k
How can I enable & force installation of PHP 7.3 on Centos 7?如何在 Centos 7 上启用和强制安装PHP 7.3 ?
I want to avoid doing it manually like:
$ sudo yum install php73 php73-php-cli php73-php-fpm
我想避免像这样手动操作:
$ sudo yum install php73 php73-php-cli php73-php-fpm
If you want PHP 7.3 you must only enable " remi-php73 " repository (and " remi-safe ", which is enabled by default).如果您想要PHP 7.3,您必须只启用“ remi-php73 ”存储库(和“ remi-safe ”,默认情况下启用)。
According to yum output in your question " remi-php80 " is wrongly enabled.根据您问题中的 yum 输出,“ remi-php80 ”被错误启用。 You can wheck which repositories are enabled using
您可以使用以下方法检查启用了哪些存储库
# yum repolist
For a proper repository configuration, see the Wizard instructions有关正确的存储库配置,请参阅向导说明
# yum-config-manager --disable 'remi-php*'
# yum-config-manager --enable remi-php73
# yum-config-manager --enable remi-safe
About mcrypt extension, I recommend you get rid of it, see About libmcrypt and php-mcrypt关于mcrypt扩展,我建议你去掉它,参见关于 libmcrypt 和 php-mcrypt
And I think you don't need both php (mod_php for Apache HTTP Server) and php-fpm而且我认为您不需要php (用于 Apache HTTP Server 的 mod_php)和php-fpm
And for php-oci8 , I recommend you read Installation of Oracle extensions for PHP对于php-oci8 ,我建议您阅读Installation of Oracle extensions for PHP
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.