Comments (20)
可以給我看一下 $PATH 嗎?
echo $PATH
from phpbrew.
應該是要這樣:
$ which pecl
/Users/c9s/.phpbrew/php/php-5.4.0/bin/pecl
Off 之後:
$ which pecl
/opt/local/bin/pecl
from phpbrew.
我的 $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.
補充,在 /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.
裝 php 的時候有 +pear 嗎 ?
from phpbrew.
有的,安裝指令如下:
phpbrew install --no-test php-5.4.0 +apxs2=/usr/sbin/apxs +pear +pdo +sqlite +mysql
from phpbrew.
用新版本的 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.
喔對了 pear 這個 variant 後來已經改為預設(一定要的了) 所以新版的 phpbrew 不加上 pdo 跟 pear 沒關係
from phpbrew.
瞭解,我重新安裝試試看,有問題再回報。
from phpbrew.
重新安裝後,問題還是一樣, phpbrew 並沒有在 ~/.phpbrew/php/php-5.4.0/bin 下安裝 pear 及 pecl ?還是我需要先 switch 過去後,再安裝一次 pear ?
from phpbrew.
我用以下的方法解決了:
~ 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.
這樣的話 /Users/jaceju/.phpbrew/php/php-5.4.0/bin 底下有 pecl 或 pear 嗎 ?
from phpbrew.
這個地方有點奇怪,因為我之前有一次好像也是沒有 pear, pecl 後來重裝卻又有了 XD
from phpbrew.
用 php go-pear.phar 裝的話,就會出現了,但之前重新安裝三次都是沒有 :(
from phpbrew.
真奇怪,找時間研究看看 @@
from phpbrew.
對了你裝的 log 檔可以貼上來看看嗎 ?
from phpbrew.
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.
我把 ~/.pearrc 移掉再重裝就可以了。但這樣就造成系統原先的 pear 會無法正確使用。
from phpbrew.
其實應該是要分開 library path 才對。
有可能是因為 .pearrc 的關係所以才沒裝上去?我需要測試一下
from phpbrew.
我後來測試發現,如果你已經用 go-pear 裝了 pear,那麼 php 在 build 的時候就不會另外幫你裝 pear 。
from phpbrew.
Related Issues (20)
- Unable to install intl extension on ubuntu 22.0.4 with php 7.2 compiled from phpbrew HOT 16
- installing/enabling imagick leads to segmentation fault on Kubuntu 23.04 HOT 5
- Can't install on php 8.2.4 HOT 4
- Php 8.2 not supported? HOT 9
- PHP Fatal error: Uncaught TypeError: array_merge(): Argument #1 must be of type array HOT 5
- When will PHP 8.2 be supported? HOT 6
- Centos8 install php 8 error
- Cannot switch to PHP v8.2.8 HOT 1
- PHP 8.1.11 (or 12) pgsql pg_config... not found … Cannot find libpq-fe.h HOT 2
- "patch for fix readline detection" is broken HOT 3
- Release workflow may have some problems
- Problems with 2.2.0 HOT 6
- Was 2.2.0 retagged? HOT 1
- bad pattern issue with phpbrew in macos HOT 1
- RuntimeException: Can't decode release json, invalid JSON string: [] HOT 2
- Failed to install php 7.4.33 on Mac HOT 7
- Abnormal termination (Segfaults) when running compiled php 8.2 as FPM process HOT 1
- phpbrew ext install redis: Error: Command failed
- PHP 8.4 deprecation: Implicitly marking parameter as nullable is deprecated
- PHP 8.1 fails with libxml 2.12.0+ HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phpbrew.