sudo pecl install apc 返回错误
我运行命令: sudo pecl install apc
文件被下载,配置成功,然后启动 make 并收到以下错误。
/usr/include/php5/ext/pcre/php_pcre.h:29:致命错误:pcre.h:没有这样的文件或目录
有办法修复它吗?
I run the command: sudo pecl install apc
The file gets downloaded, the configuration succeeds, then make
is launched and I get the following error.
/usr/include/php5/ext/pcre/php_pcre.h:29: fatal error: pcre.h: No such file or directory
Is there a way to fix it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
PCRE 是安装 APC 的依赖项。 快速安装
您可以使用 yum install pcre-devel 或 apt-get install libpcre3-dev
它,安装完成后,重新运行
sudo pecl install apc代码>
PCRE is a dependency for installing APC. You can install it pretty quick with
yum install pcre-devel
orapt-get install libpcre3-dev
once it's installed, re-run
sudo pecl install apc
sudo apt-get install libpcre3-dev 就是答案。
因此,为了能够安装 pecl [安装扩展],
需要以下软件包:
sudo apt-get install libpcre3-dev is the answer.
So to be able to install pecl [install extension]
the following packages are required:
PHP 什么版本?
几个月前,有一段时间,我在安装 APC 时遇到了麻烦,只能通过
pecl install apc-beta
使其工作。如果您不处理生产系统,您可以尝试一下。
What version of PHP?
For a while, some months ago, I had trouble installing APC, and could only make it work with
pecl install apc-beta
If you're not dealing with a production system, you might try that.
您似乎缺少 PHP5 的开发版本。在 Ubuntu 上,您可以使用以下命令安装它:
You seem to be missing the development version of PHP5. On Ubuntu you can install it using:
您以前通过 PECL 安装过 PHP 扩展吗?
文件
/usr/include/php5/ext/pcre/php_pcre.h
确实存在吗?您可能会收到此错误,因为以下权限
Have you install a PHP extension via PECL before?
Does the file
/usr/include/php5/ext/pcre/php_pcre.h
actually exist?You could get this error because of the following
我已经发布了相同的答案
要包含 pcre.h 文件,请在包档案中搜索 pcre.h 文件。
为此,我使用名为 apt-file 的命令(
和
如果您没有安装 )。
然后搜索pcre包:
-x 通知命令我想使用正则表达式作为模式。 apt-file 为我提供了三个命中:
最后一项是我想要的:
这将解决pcre.h文件编译问题。希望它能帮助其他可能来寻找此主题答案的人。
I have posted an answer for the same here. But I am still posting here for reference
To include pcre.h file, search the package archives for the pcre.h file.
To do this I use a command called apt-file (
and
if you don’t have it installed).
Then search for the pcre package:
The -x informs the command that I want to use a regular expression as the pattern. apt-file provided me with three hits:
The last one is the one I want:
This will solve the problem with pcre.h file compilation problem. Hope it will help others, who may come to find an answer to this thread.