centos / rhelでhttpd24(apacheバージョン2.4.10)を使用してphp5.6.2をインストールします。

centos / rhelでhttpd24(apacheバージョン2.4.10)を使用してphp5.6.2をインストールします。

次のリポジトリを使用してください。http://dl.iuscommunity.org/pub/ius/stable/CentOS/6/x86_64/ius-release-1.0-13.ius.centos6.noarch.rpmPHP インストールの場合 Apache の場合は Amazon Linux repo を使用します。

現在のPHPバージョン:

$ php -v

PHP 5.6.2 (cli) (built: Nov  4 2014 10:01:39) 
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2014 Zend Technologies

現在のApacheバージョン:

$ httpd -v 

Server version: Apache/2.4.10 (Amazon)
Server built:   Jul 30 2014 23:57:26

このレベルまではすべて大丈夫です。

PHP用にインストールされたパッケージは次のとおりです。

$ yum list installed | grep php

php56u-bcmath.x86_64            5.6.2-3.ius.centos6        @ius                 
php56u-cli.x86_64               5.6.2-3.ius.centos6        @ius                 
php56u-common.x86_64            5.6.2-3.ius.centos6        @ius                 
php56u-devel.x86_64             5.6.2-3.ius.centos6        @ius                 
php56u-embedded.x86_64          5.6.2-3.ius.centos6        @ius                 
php56u-enchant.x86_64           5.6.2-3.ius.centos6        @ius                 
php56u-gd.x86_64                5.6.2-3.ius.centos6        @ius                 
php56u-imap.x86_64              5.6.2-3.ius.centos6        @ius                 
php56u-intl.x86_64              5.6.2-3.ius.centos6        @ius                 
php56u-ldap.x86_64              5.6.2-3.ius.centos6        @ius                 
php56u-mbstring.x86_64          5.6.2-3.ius.centos6        @ius                 
php56u-mcrypt.x86_64            5.6.2-3.ius.centos6        @ius                 
php56u-mysqlnd.x86_64           5.6.2-3.ius.centos6        @ius                 
php56u-pdo.x86_64               5.6.2-3.ius.centos6        @ius                 
php56u-pear.noarch              1:1.9.5-1.ius.centos6      @ius                 
php56u-pecl-jsonc.x86_64        1.3.6-3.ius.centos6        @ius                 
php56u-pecl-jsonc-devel.x86_64  1.3.6-3.ius.centos6        @ius                 
php56u-pgsql.x86_64             5.6.2-3.ius.centos6        @ius                 
php56u-process.x86_64           5.6.2-3.ius.centos6        @ius                 
php56u-pspell.x86_64            5.6.2-3.ius.centos6        @ius                 
php56u-recode.x86_64            5.6.2-3.ius.centos6        @ius                 
php56u-snmp.x86_64              5.6.2-3.ius.centos6        @ius                 
php56u-soap.x86_64              5.6.2-3.ius.centos6        @ius                 
php56u-tidy.x86_64              5.6.2-3.ius.centos6        @ius                 
php56u-xml.x86_64               5.6.2-3.ius.centos6        @ius           

インストールされたApacheパッケージは次のとおりです。

$ yum list installed | grep http

httpd24.x86_64                  2.4.10-1.59.amzn1          @amzn-main           
httpd24-tools.x86_64            2.4.10-1.59.amzn1          @amzn-main        

Apache用のphp-extensionをインストールしようとするとphp56u.x86_64

時々こんな感じ

$ yum install php56u.x86_64   
Loaded plugins: priorities, update-motd, upgrade-helper
amzn-main/latest                                                                | 2.1 kB     00:00     

amzn-updates/latest                                                             | 2.3 kB     00:00     

4361 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check

---> Package php56u.x86_64 0:5.6.2-3.ius.centos6 will be installed
--> Processing Dependency: httpd-mmn = 20051115 for package: php56u-5.6.2-3.ius.centos6.x86_64
--> Running transaction check
---> Package httpd.x86_64 0:2.2.29-1.4.amzn1 will be installed
--> Processing Dependency: httpd-tools = 2.2.29-1.4.amzn1 for package: httpd-2.2.29-1.4.amzn1.x86_64
--> Running transaction check
---> Package httpd-tools.x86_64 0:2.2.29-1.4.amzn1 will be installed
--> Processing Conflict: httpd24-2.4.10-1.59.amzn1.x86_64 conflicts httpd < 2.4.10
--> Processing Conflict: httpd24-tools-2.4.10-1.59.amzn1.x86_64 conflicts httpd-tools < 2.4.10
--> Finished Dependency Resolution
Error: httpd24-tools conflicts with httpd-tools-2.2.29-1.4.amzn1.x86_64
Error: httpd24 conflicts with httpd-2.2.29-1.4.amzn1.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest`

ベストアンサー1

IUSは2.4ではなくApache 2.2用のようですphp56u。したがって、httpd.x86_64 0:2.2.29-1.4(Apache 2.2.29)と関連するすべてのツール(httpd-tools.x86_64 0:2.2.29-1.4)をインストールしようとしています。

ただし、これら2つは、httpd24-2.4.10-1.59Amazonリポジトリからインストールしたものと競合しています。

試してみてくださいレミ買戻契約- CentOS 6用のPHP 5.6とApache 2.4の両方があると思います。

要件を満たしている場合は、IUS および Amazon リポジトリとそのパッケージを削除して再起動することをお勧めします。

機能しない場合、いくつかのオプションは次のとおりです。

  • 必要なApacheとPHPのバージョンを持つ他のリポジトリを見つけてください。私はFedora 21にこれがあると信じています。ここでの問題は、あまりにも多くの依存関係を引き付けているため、システムがCentOS-6 / Fedora-21の混合インストールになって管理するのが難しい可能性があることです(すでに見つけたように)。

  • 作るRPM仕様ファイル独自のRPMを構築するか、次のものを使用してください。RPMはあなたのために作られています。 RPMを構築すると、後で削除するのが簡単になります。

  • Apache 2.4で使用するためのソースからPHP 5.6をビルドする

  • リポジトリが必要なバージョンに更新されるのを待ちます。

おすすめ記事