GithubHelp home page GithubHelp logo

pecl problem about phpbrew HOT 20 CLOSED

phpbrew avatar phpbrew commented on June 23, 2024
pecl problem

from phpbrew.

Comments (20)

c9s avatar c9s commented on June 23, 2024

可以給我看一下 $PATH 嗎?

  echo $PATH 

from phpbrew.

c9s avatar c9s commented on June 23, 2024

應該是要這樣:

 $ which pecl 
 /Users/c9s/.phpbrew/php/php-5.4.0/bin/pecl

Off 之後:

 $ which pecl
 /opt/local/bin/pecl

from phpbrew.

jaceju avatar jaceju commented on June 23, 2024

我的 $PATH :

/Users/jaceju/.phpbrew/php/php-5.4.0/bin:/Users/jaceju/.bin:/usr/local/Cellar/pear/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Users/jaceju/.rvm/bin

from phpbrew.

jaceju avatar jaceju commented on June 23, 2024

補充,在 /Users/jaceju/.phpbrew/php/php-5.4.0/bin 底下沒有 pecl :

~  ls /Users/jaceju/.phpbrew/php/php-5.4.0/bin 
phar       phar.phar  php        php-cgi    php-config phpize

from phpbrew.

c9s avatar c9s commented on June 23, 2024

裝 php 的時候有 +pear 嗎 ?

from phpbrew.

jaceju avatar jaceju commented on June 23, 2024

有的,安裝指令如下:

phpbrew install --no-test php-5.4.0 +apxs2=/usr/sbin/apxs +pear +pdo +sqlite +mysql

from phpbrew.

jaceju avatar jaceju commented on June 23, 2024

用新版本的 phpbrew 重新安裝,結果如下:

php  phpbrew install --no-test php-5.4.0 +apxs2=/usr/sbin/apxs +pear +pdo +sqlite +mysql +openssl
===> Downloading http://www.php.net/distributions/php-5.4.0.tar.bz2
######################################################################## 100.0%
===> Extracting...
Build Dir: /Users/jaceju/.phpbrew/build/php-5.4.0
===> Cleaning...
Variant pear is not defined.

from phpbrew.

c9s avatar c9s commented on June 23, 2024

喔對了 pear 這個 variant 後來已經改為預設(一定要的了) 所以新版的 phpbrew 不加上 pdo 跟 pear 沒關係

from phpbrew.

jaceju avatar jaceju commented on June 23, 2024

瞭解,我重新安裝試試看,有問題再回報。

from phpbrew.

jaceju avatar jaceju commented on June 23, 2024

重新安裝後,問題還是一樣, phpbrew 並沒有在 ~/.phpbrew/php/php-5.4.0/bin 下安裝 pear 及 pecl ?還是我需要先 switch 過去後,再安裝一次 pear ?

from phpbrew.

jaceju avatar jaceju commented on June 23, 2024

我用以下的方法解決了:

~ wget http://pear.php.net/go-pear.phar
~ php go-pear.phar
Installation base: /Users/jaceju/.phpbrew/php/php-5.4.0

然後把原有的 pear 目錄連過來:

~ cd /Users/jaceju/.phpbrew/php/php-5.4.0/share
~ ln -s /usr/local/Cellar/pear/share/pear

暫時是這樣解。

from phpbrew.

c9s avatar c9s commented on June 23, 2024

這樣的話 /Users/jaceju/.phpbrew/php/php-5.4.0/bin 底下有 pecl 或 pear 嗎 ?

from phpbrew.

c9s avatar c9s commented on June 23, 2024

這個地方有點奇怪,因為我之前有一次好像也是沒有 pear, pecl 後來重裝卻又有了 XD

from phpbrew.

jaceju avatar jaceju commented on June 23, 2024

用 php go-pear.phar 裝的話,就會出現了,但之前重新安裝三次都是沒有 :(

from phpbrew.

c9s avatar c9s commented on June 23, 2024

真奇怪,找時間研究看看 @@

from phpbrew.

c9s avatar c9s commented on June 23, 2024

對了你裝的 log 檔可以貼上來看看嗎 ?

from phpbrew.

jaceju avatar jaceju commented on June 23, 2024

log 如下:

~ tail -f /Users/jaceju/.phpbrew/php/php-5.4.0/build.log

[PEAR] Console_Getopt - installed: 1.3.0
[PEAR] Structures_Graph- installed: 1.0.4
[PEAR] XML_Util       - installed: 1.2.1
[PEAR] PEAR           - installed: 1.9.4
Warning! a PEAR user config file already exists from a previous PEAR installation at '/Users/jaceju/.pearrc'. You may probably want to remove it.
Wrote PEAR system config file at: /Users/jaceju/.phpbrew/php/php-5.4.0/etc/pear.conf
You may want to add: /Users/jaceju/.phpbrew/php/php-5.4.0/lib/php to your php.ini include_path
/Users/jaceju/.phpbrew/build/php-5.4.0/build/shtool install -c ext/phar/phar.phar /Users/jaceju/.phpbrew/php/php-5.4.0/bin
ln -s -f /Users/jaceju/.phpbrew/php/php-5.4.0/bin/phar.phar /Users/jaceju/.phpbrew/php/php-5.4.0/bin/phar
Installing PDO headers:          /Users/jaceju/.phpbrew/php/php-5.4.0/include/php/ext/pdo/

from phpbrew.

jaceju avatar jaceju commented on June 23, 2024

我把 ~/.pearrc 移掉再重裝就可以了。但這樣就造成系統原先的 pear 會無法正確使用。

from phpbrew.

c9s avatar c9s commented on June 23, 2024

其實應該是要分開 library path 才對。

有可能是因為 .pearrc 的關係所以才沒裝上去?我需要測試一下

from phpbrew.

c9s avatar c9s commented on June 23, 2024

我後來測試發現,如果你已經用 go-pear 裝了 pear,那麼 php 在 build 的時候就不會另外幫你裝 pear 。

from phpbrew.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.