sudo pecl安装apc返回错误

时间:2022-08-29 07:14:11

I run the command: sudo pecl install apc

我运行命令:sudo pecl安装apc

The file gets downloaded, the configuration succeeds, then make is launched and I get the following error.

文件被下载,配置成功,然后make被启动,我得到以下错误。

/usr/include/php5/ext/pcre/php_pcre.h:29: fatal error: pcre.h: No such file or directory

/usr/include/php5/ext/pcre/php_pcre.h:29:致命错误:pcre。h:没有这样的文件或目录

Is there a way to fix it?

有办法解决吗?

6 个解决方案

#1


101  

PCRE is a dependency for installing APC. You can install it pretty quick with

PCRE是安装APC的依赖项。你可以很快地安装它。

yum install pcre-devel or apt-get install libpcre3-dev

yum安装pcred -devel或apt-get安装libpcre3-dev。

once it's installed, re-run

一旦安装,重新运行

sudo pecl install apc

sudo pecl安装apc

#2


12  

sudo apt-get install libpcre3-dev is the answer.

sudo apt-get install libpcre3-dev就是答案。

So to be able to install pecl [install extension]

这样才能安装pecl[安装扩展]

the following packages are required:

需要以下软件包:

sudo apt-get install php5-pear php5-dev libpcre3-dev

#3


3  

What version of PHP?

什么版本的PHP ?

For a while, some months ago, I had trouble installing APC, and could only make it work with pecl install apc-beta

有一段时间,几个月前,我在安装APC时遇到了麻烦,只能让它与pecl安装APC -beta一起工作

If you're not dealing with a production system, you might try that.

如果您不处理生产系统,您可以尝试一下。

#4


3  

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 (

包括pcre。h文件,查找pcre的软件包档案。h文件。为此,我使用了一个名为apt-file的命令(

apt-get install apt-file

apt-get安装apt-file

and

apt-file update

apt-file更新

if you don’t have it installed). Then search for the pcre package:

如果你没有安装它)。然后搜索pcre包:

apt-file search -x "/pcre.h$"

apt-file搜索- x”/ pcre.h $”

The -x informs the command that I want to use a regular expression as the pattern. apt-file provided me with three hits:

x通知命令我要使用正则表达式作为模式。apt文件为我提供了三个点击:

  • kannel-dev: /usr/include/kannel/gwlib/pcre.h
  • kannel-dev:/usr/include/kannel/gwlib/pcre.h
  • libajax6-dev: /usr/include/ajax/pcre.h
  • libajax6-dev:/usr/include/ajax/pcre.h
  • libpcre3-dev: /usr/include/pcre.h
  • libpcre3-dev:/usr/include/pcre.h

The last one is the one I want:

最后一个是我想要的

apt-get install libpcre3-dev

apt-get安装libpcre3-dev

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.

这将解决pcre的问题。h文件编译问题。希望它能帮助其他人,他们可能会找到这个线索的答案。

#5


1  

You seem to be missing the development version of PHP5. On Ubuntu you can install it using:

您似乎错过了PHP5的开发版本。在Ubuntu上,你可以使用:

sudo aptitude install php5-dev

#6


1  

Have you install a PHP extension via PECL before?

您以前通过PECL安装过PHP扩展吗?

Does the file /usr/include/php5/ext/pcre/php_pcre.h actually exist?

这个文件/usr/include/php5/ext/pcre/php_pcre.h真的存在吗?

You could get this error because of the following

由于以下原因,您可能会得到这个错误

  1. Incorrect permissions
  2. 不正确权限
  3. PECL directory configuration is incorrect.
  4. PECL目录配置不正确。

#1


101  

PCRE is a dependency for installing APC. You can install it pretty quick with

PCRE是安装APC的依赖项。你可以很快地安装它。

yum install pcre-devel or apt-get install libpcre3-dev

yum安装pcred -devel或apt-get安装libpcre3-dev。

once it's installed, re-run

一旦安装,重新运行

sudo pecl install apc

sudo pecl安装apc

#2


12  

sudo apt-get install libpcre3-dev is the answer.

sudo apt-get install libpcre3-dev就是答案。

So to be able to install pecl [install extension]

这样才能安装pecl[安装扩展]

the following packages are required:

需要以下软件包:

sudo apt-get install php5-pear php5-dev libpcre3-dev

#3


3  

What version of PHP?

什么版本的PHP ?

For a while, some months ago, I had trouble installing APC, and could only make it work with pecl install apc-beta

有一段时间,几个月前,我在安装APC时遇到了麻烦,只能让它与pecl安装APC -beta一起工作

If you're not dealing with a production system, you might try that.

如果您不处理生产系统,您可以尝试一下。

#4


3  

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 (

包括pcre。h文件,查找pcre的软件包档案。h文件。为此,我使用了一个名为apt-file的命令(

apt-get install apt-file

apt-get安装apt-file

and

apt-file update

apt-file更新

if you don’t have it installed). Then search for the pcre package:

如果你没有安装它)。然后搜索pcre包:

apt-file search -x "/pcre.h$"

apt-file搜索- x”/ pcre.h $”

The -x informs the command that I want to use a regular expression as the pattern. apt-file provided me with three hits:

x通知命令我要使用正则表达式作为模式。apt文件为我提供了三个点击:

  • kannel-dev: /usr/include/kannel/gwlib/pcre.h
  • kannel-dev:/usr/include/kannel/gwlib/pcre.h
  • libajax6-dev: /usr/include/ajax/pcre.h
  • libajax6-dev:/usr/include/ajax/pcre.h
  • libpcre3-dev: /usr/include/pcre.h
  • libpcre3-dev:/usr/include/pcre.h

The last one is the one I want:

最后一个是我想要的

apt-get install libpcre3-dev

apt-get安装libpcre3-dev

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.

这将解决pcre的问题。h文件编译问题。希望它能帮助其他人,他们可能会找到这个线索的答案。

#5


1  

You seem to be missing the development version of PHP5. On Ubuntu you can install it using:

您似乎错过了PHP5的开发版本。在Ubuntu上,你可以使用:

sudo aptitude install php5-dev

#6


1  

Have you install a PHP extension via PECL before?

您以前通过PECL安装过PHP扩展吗?

Does the file /usr/include/php5/ext/pcre/php_pcre.h actually exist?

这个文件/usr/include/php5/ext/pcre/php_pcre.h真的存在吗?

You could get this error because of the following

由于以下原因,您可能会得到这个错误

  1. Incorrect permissions
  2. 不正确权限
  3. PECL directory configuration is incorrect.
  4. PECL目录配置不正确。

相关文章