php PEAR 包通常安装在哪里?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5334251/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Where do PEAR packages normally get installed?
提问by rlandster
I am using a Debian squeeze server. I have installed PEAR using aptitude install php-pear
. This created a directory /usr/share/php/PEAR
.
我正在使用 Debian 挤压服务器。我已经使用aptitude install php-pear
. 这创建了一个目录/usr/share/php/PEAR
。
I installed some PEAR packages including Phing. I installed the Phing files using pear install --alldeps phing/phing
and the files showed up in /usr/share/php/phing
.
我安装了一些 PEAR 包,包括 Phing。我使用安装了 Phing 文件pear install --alldeps phing/phing
,文件显示在/usr/share/php/phing
.
But shouldn't PEAR packages (under normal circumstances) be put in /usr/share/php/PEAR
? When I run
但是不应该放入 PEAR 包(在正常情况下)/usr/share/php/PEAR
吗?当我跑
pear config-get php_dir
I get "/usr/share/php
". Have I got something configured wrong?
我得到“ /usr/share/php
”。我有什么配置错误吗?
采纳答案by cweiske
/usr/share/php/
is correct for Debian.
对 Debian 来说是正确的。
/usr/share/php/PEAR
itself contains classes for PEAR itself.
本身包含 PEAR 本身的类。
The reason for using /usr/share/php
is that the pear
CLI tool is an installer that installs libraries (or applications) for PHP - choosing php
is thus correct.
使用的原因/usr/share/php
是pear
CLI 工具是为 PHP 安装库(或应用程序)的安装程序 -php
因此选择是正确的。
回答by vrkansagara
Whatever O/S you are using it doesn't matter.
无论您使用什么操作系统,都无关紧要。
You just need to use the pear config-get php_dir
via a console. And you get full directory path.
您只需要pear config-get php_dir
通过控制台使用 。你会得到完整的目录路径。
For XAMPP application on Microsoft Window you have to go to XAMPP installation directory path <<XAMPP Installation folder path>>/bin
and use ./pear config-get php_dir
which lead to execute the binary file using current location and do the same job.
对于 Microsoft Window 上的 XAMPP 应用程序,您必须转到 XAMPP 安装目录路径<<XAMPP Installation folder path>>/bin
并使用./pear config-get php_dir
它来使用当前位置执行二进制文件并执行相同的工作。
回答by Nick
in case php is installed in /usr/local/php
如果 php 安装在 /usr/local/php
pear is here:
梨在这里:
/usr/local/php/lib/php
/usr/local/php/lib/php
回答by kleinermann
On my installation of Debian PEAR is located here:
在我的 Debian PEAR 安装中,位于此处:
/usr/local/lib/php
回答by nerdlinger
Just throwing this out there, in case you have pear installed in a round-about way:
只是把它扔在那里,以防你以迂回的方式安装梨:
cd /
find . -type d -name pear
For example, I was using MAMP on one of my local machines and it was in a really weird place.
例如,我在我的一台本地机器上使用 MAMP,它在一个非常奇怪的地方。
回答by itsazzad
I am using Mac OSX Lion.
I installed pear in /usr/lib/php/pear
我正在使用 Mac OSX Lion。我安装了梨/usr/lib/php/pear
So the data also be installed there.
所以数据也安装在那里。
回答by Jakob Alexander Eichler
On my 64-bit Ubuntu system, the pear packages are installed to /usr/share/php/PEAR/
,
but I do not know how to change the pear install path. Maybe you can configure this somewhere.
在我的 64 位 Ubuntu 系统上,pear 包安装到/usr/share/php/PEAR/
,但我不知道如何更改 pear 安装路径。也许你可以在某处配置它。
回答by Amaynut
If you're using CPanel to install them they're much likely to be located in
如果您使用 CPanel 安装它们,它们很可能位于
./opt/cpanel/ea-php{VERSION}/root/usr/share/pear