现在试图安装PHP 7;
(在7号)
补充说:
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm Then installed via: yum install php70w php70w-opcache
输出是:
[root@host]# yum install php70w php70w-opcache Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.advancedhosters.com * epel: mirror.symnds.com * extras: mirror.netdepot.com * updates: mirrors.rit.edu * webtatic: us-east.repo.webtatic.com Resolving Dependencies --> Running transaction check ---> Package php70w.x86_64 0:7.0.2-1.w7 will be installed --> Processing Dependency: php70w-common(x86-64) = 7.0.2-1.w7 for package: php70w-7.0.2-1.w7.x86_64 --> Processing Dependency: php70w-cli(x86-64) = 7.0.2-1.w7 for package: php70w-7.0.2-1.w7.x86_64 --> Processing Dependency: php70w-cli = 7.0.2-1.w7 for package: php70w-7.0.2-1.w7.x86_64 ---> Package php70w-opcache.x86_64 0:7.0.2-1.w7 will be installed --> Running transaction check ---> Package php70w-cli.x86_64 0:7.0.2-1.w7 will be installed ---> Package php70w-common.x86_64 0:7.0.2-1.w7 will be installed --> Processing Conflict: php70w-common-7.0.2-1.w7.x86_64 conflicts php-common < 5.5.0 --> Finished Dependency Resolution Error: php70w-common conflicts with php-common-5.4.16-36.el7_1.x86_64 You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest
所以问题是: Error: php70w-common conflicts with php-common-5.4.16-36.el7_1.x86_64
如何解决这个问题? 我需要两个版本同时运行。
您可以将C7(及其他)的php7作为软件集合(scl)安装,它与系统提供的php 5一起安装,完全独立于它。 您可以在REMI回购中findphp7 scl。 您也可能对SF的这个问答感兴趣。
我不认为这是好的方法。 如果你在一台服务器上有不同的PHP版本,configuration和编程是非常华丽的。 如果你有一个单独的服务器,这会容易得多。 另外为什么你需要两个? PHP 5应用程序几乎兼容PHP 7 …如果他们使用mysql_connect而不是mysqli