Pear install via macports
I am on a mac running Leopard. I installed pear successfully via macports variant. When I type in pear in the terminal I get a list of commands which is what you should get.
PEAR Version: 1.9.1
PHP Version: 5.3.5
Zend Engine Version: 2.3.0
Running on: Darwin demetrius-fords-macbook-pro-53.local 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386.
when I type in which pear
I get: /opt/local/bin/pear. That's where pear is located and I also have /opt/local/bin
first in my bash_login file also. So when I go to install phpunit I get this error:
demetrius-fords-macbook-pro-53:~ demet8$ pear channel-discover pear.phpunit.de
could not create lock file: fopen(/usr/local/PEAR/.lock): failed to open stream: Permission denied
It looks as though it's looking for pear in the wrong path? I thought macports would have created a symlink for the pear in开发者_C百科stall? what would I need to do? thanks..
You should actually type "sudo pear channel-discover pear.phpunit.de", not "pear channel-discover pear.phpunit.de", and then type you password.
That way you will validate your self to the system as user (admin) with enough privileges to do the action, so to say.
Best.
I'm not to sure how that work on a mac but see if pear is using the right path you can check
pear config-show
and use pear config-set
to change them if needed
That should be the important ones:
PEAR executables directory bin_dir /opt/lampp/bin
PEAR documentation directory doc_dir /opt/lampp/lib/php/doc
PHP extension directory ext_dir /opt/lampp/lib/php/extensions/no-debug-non-zts-20060613
PEAR directory php_dir /opt/lampp/lib/php
PEAR Installer cache directory cache_dir /tmp/pear/cache
PEAR configuration file cfg_dir /opt/lampp/lib/php/cfg
directory
PEAR data directory data_dir /opt/lampp/lib/php/data
PEAR Installer download download_dir /tmp/pear/download
directory
PHP CLI/CGI binary php_bin /opt/lampp/bin/php
Maybe there is a better way to do that manually. I don't know any :)
精彩评论