2012-02-13 7 views
8

APCを正常に動作させるために必要なことは、正しい場所にCコンパイラをインストールしていないようです。また、一度それがインストールされている私はそれが正しく実行されていることを確認するには?APCをインストールするときに「受け入れ可能なCコンパイラが見つかりません」

[[email protected]]# pecl install apc 
downloading APC-3.1.9.tgz ... 
Starting to download APC-3.1.9.tgz (155,540 bytes) 
.................................done: 155,540 bytes 
54 source files, building 
running: phpize 
Configuring for: 
PHP Api Version:   20090626 
Zend Module Api No:  20090626 
Zend Extension Api No: 220090626 
config.m4:180: warning: AC_CACHE_VAL(PHP_APC_GCC_ATOMICS, ...): suspicious cache-id,      must contain _cv_ to be cached 
../../lib/autoconf/general.m4:1974: AC_CACHE_VAL is expanded from... 
../../lib/autoconf/general.m4:1994: AC_CACHE_CHECK is expanded from... 
config.m4:180: the top level 
config.m4:180: warning: AC_CACHE_VAL(PHP_APC_GCC_ATOMICS, ...): suspicious cache-id,  must contain _cv_ to be cached 
../../lib/autoconf/general.m4:1974: AC_CACHE_VAL is expanded from... 
../../lib/autoconf/general.m4:1994: AC_CACHE_CHECK is expanded from... 
config.m4:180: the top level 
Enable internal debugging in APC [no] : no 
Enable per request file info about files used from the APC cache [no] : no 
Enable spin locks (EXPERIMENTAL) [no] : no 
Enable memory protection (EXPERIMENTAL) [no] : no 
Enable pthread mutexes (default) [yes] : yes 
Enable pthread read/write locks (EXPERIMENTAL) [no] : no 
building in /var/tmp/pear-build-root/APC-3.1.9 
running: /var/tmp/APC/configure --enable-apc-debug=no --enable-apc-filehits=no --enable- apc-spinlocks=no --enable-apc-memprotect=no --enable-apc-pthreadmutex=yes --enable-apc- pthreadrwlocks=no 
checking for grep that handles long lines and -e... /bin/grep 
checking for egrep... /bin/grep -E 
checking for a sed that does not truncate output... /bin/sed 
checking for cc... no 
checking for gcc... no 
configure: error: in `/var/tmp/pear-build-root/APC-3.1.9': 
configure: error: no acceptable C compiler found in $PATH 
See `config.log' for more details. 
ERROR: `/var/tmp/APC/configure --enable-apc-debug=no --enable-apc-filehits=no --enable-apc- spinlocks=no --enable-apc-memprotect=no --enable-apc-pthreadmutex=yes --enable-apc- pthreadrwlocks=no' failed 
[[email protected]]# 
+2

どのオペレーティングシステムでは、サーバのですか? –

+0

2.6.35.14-97.44.amzn1.x86_64#1 SMP Mon Oct 24 16:03:08 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux – user1179295

答えて

3

gccがインストールされていないようです。 Linuxのリリースによっては、gccをインストールする方法が異なります。あなたが使用しているリリースを投稿すれば、私たちはあなたを助けることができるでしょう。

+0

2.6.35.14-97.44.amzn1.x86_64#1 SMP Mon 2011年10月24日16:03:08 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux – user1179295

+0

これはカーネルに関する情報です。あなたが使っているLinuxのディストリビューションを知る必要があります。 –

15

システムにはCコンパイラがありません(または、それが見つからない可能性があります)。

多分あなただけ実行する必要があります。DebianやUbuntuのための

sudo apt-get install build-essential 

またはRed Hat/CentOSのための

sudo yum groupinstall "Development Tools" 

ところで、あなたのシステムのパッケージマネージャーはAPCをインストールする可能性があります。

+0

Red Hat Enterprise/CentOSでは、追加のソフトウェアリポジトリを有効にする必要があります。 [EPEL](http://fedoraproject.org/wiki/EPEL)には、(先史時代の)PHP版の 'php-pecl-apc'パッケージがあります。 – Charles

+0

私は開発ツールをインストールしました.pcl install apcを実行しようとしましたが、/var/tmp/APC/apc.c:454というエラーが出ました:エラー: 'apc_regex'に 'preg'という名前のメンバーはありません。 php-pecl-apcのためだけにsudo yum php-pecl-apcですか? – user1179295

+0

PHPにPRCEサポートがコンパイルされていますか? – Corbin

1

CentOS 6のボックスでは、私はyum install php-pecl-apcを使用しました。glib、gccなどの最初のインストールがいくつかありました。しかし、yumが依存関係を適切に処理することは少なくとも知っています。 。実際にそれに特定の速度の増加を見たが、私は、チューニングの出番これは想定していませ

1

私は次を経由して、これを解決し :

#rpm -qa | grep gcc 

# yum install gcc glibc glibc-common gd gd-devel -y 
関連する問題