简体   繁体   English

更改 Pecl 安装目录

[英]Changing Pecl installation directory

Hi i'm having trouble with pecl installation, the problem i'm having is i'm installing gearman , and i'm now at the stage of installation of the pecl PHP extension.嗨,我在安装 pecl 时遇到了问题,我遇到的问题是我正在安装gearman ,而我现在正处于安装 pecl PHP 扩展的阶段。

it should be a simple as executing the command :执行命令应该很简单:

$ sudo pecl install gearman

the installation was successfull and I could even test a php containing安装成功,我什至可以测试一个包含

<?php
echo "Gearman version: " . gearman_version() . PHP_EOL;
?>

executing it in CLI php using :使用以下命令在 CLI php 中执行它:

$ php gearman_version.php

does the trick.诀窍。 Unfortunately I am using a stack.不幸的是,我正在使用堆栈。 lappstack to be precise, and I have a separate php in the installation of my lappstack which is in :准确地说lappstack ,我在我的lappstack安装中有一个单独的php,它位于:

/home/userName/lappstack-5.4.34-0/php

where php/etc contains my php.ini for web use.其中 php/etc 包含我的php.ini供网络使用。

now, going back to the pecl installation of gearman, executing the pecl install gearman results to gearman being installed in a separate php5 installation, and the gearman.so is installed in :现在,回到 gearman 的 pecl 安装,执行pecl install gearman结果是 gearman 安装在单独的 php5 安装中,并且gearman.so安装在:

/usr/lib/php5/20121212/gearman.so

which, ideally, the gearman.so should be contained in :理想情况下, gearman.so 应该包含在:

/home/userName/lappstack-5.4.34-0/php/lib/php/extensions/gearman.so

like all my other extensions.就像我所有的其他扩展一样。

which actually results to the application not being able to use the gearman extension.这实际上导致应用程序无法使用 gearman 扩展。 And the php.ini that is being pointed to, to use gearman is actually the ones in :而被指向的 php.ini 使用 gearman 实际上是:

/etc/php5/cli

and

/etc/php5/apache2

I need help, I'm really in the process of getting haywired in my installations.我需要帮助,我真的在我的安装过程中变得混乱。 Thanks !谢谢 !

You can see the configured directories with 您可以看到配置的目录

$ pear config-show

To change the directories, eg php_dir , use config-set : 要更改目录,例如php_dir ,请使用config-set

$ pear config-set php_dir /path/to/foo

You searching for param "ext_dir".您正在搜索参数“ext_dir”。 You can show current PECL installation directory with:您可以使用以下命令显示当前的 PECL 安装目录:

pear config-show | grep "ext_dir"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM