安装 APC 红帽

zac*_*yka 16 php redhat

我正在尝试在 redhat 上安装 apc,所以我做了:

pecl install apc
Run Code Online (Sandbox Code Playgroud)

我说

Use apxs to set compile flags (if using APC with Apache)? [yes]:
Run Code Online (Sandbox Code Playgroud)

我明白了:

checking for re2c... no
configure: WARNING: You will need re2c 0.9.11 or later if you want to \
regenerate PHP parsers.
Run Code Online (Sandbox Code Playgroud)

checking whether apc needs to get compiler flags from apxs...

Sorry, I was not able to successfully run APXS.  Possible reasons:

1.  Perl is not installed;
2.  Apache was not compiled with DSO support (--enable-module=so);
3.  'apxs' is not in your path.  Try to use --with-apxs=/path/to/apxs
The output of apxs follows
/tmp/tmpJQuZdD/APC-3.0.16/configure: line 3846: apxs: command not found
configure: error: Aborting
ERROR: `/tmp/tmpJQuZdD/APC-3.0.16/configure --with-apxs' failed
Run Code Online (Sandbox Code Playgroud)

可能是什么问题呢?谢谢

小智 20

你忘记了这个包裹:

sudo yum install httpd-devel.i386
Run Code Online (Sandbox Code Playgroud)

或者

sudo yum install httpd-devel
Run Code Online (Sandbox Code Playgroud)

您可能还需要:

apt-get install apache2-threaded-dev
Run Code Online (Sandbox Code Playgroud)

完成后,再试一次,最后重启 apache:

sudo apachectl -k graceful
Run Code Online (Sandbox Code Playgroud)