目前,我正在尝试安装Zend框架。该框架附带命令行工具,适用于*nix系统的zf.sh和适用于Windows系统的zf.bat。为了使用zf.sh,我尝试将它添加到我的环境路径中。不知何故,我不能让它工作。
我的~/.profile
export PATH=$PATH:/Applications/MAMP/bin/php/php5.3.6/bin/
export ZEND=/Applications/MAMP/bin/php/php5.3.6/bin/zf.sh
# 2012-06-05 make alias for zf
# Make an alias for the zf.sh so we can call it with zf instead of zf.sh
alias zf=/Applications/MAMP/bin/php/php5.3.6/bin/zf.sh
# Add the path to the Zend files so that the zf.sh can work with them
ZEND_TOOL_INCLUDE_PATH=/Applications/MAMP/bin/php/php5.3.6/lib/php/Zend我的/etc/paths
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin
~/Development/play-2.0
/Applications/Racket\ v5.2/bin/
/Applications/MAMP/bin/php/php5.3.6/bin/但是当我做echo $PATH的时候
/usr/bin /bin /usr/sbin /sbin /usr/local/bin /usr/X11R6/bin或zf
fish: Unknown command 'zf'发布于 2012-06-20 04:57:10
将alias zf='/var/www/zf1_trunk/bin/zf.sh'添加到.bash_profile应允许您访问zf命令行
at ~/.bash_profile
alias zf='/var/www/zf1_trunk/bin/zf.sh'发布于 2013-10-16 11:51:05
如果您在MAC OS X中使用MAMP
在编辑器中键入"vi .bash_profile"
“打开终端编辑器中的行
别名zf='/Applications/MAMP/bin/php/php5.3.6/bin/zf.sh‘
更改位置访问到您的软件安装
终端退出Terminal
发布于 2012-06-20 03:04:39
通常,OSX上的bash使用.bash_profile,而不是.profile...看看它的来源是否正确。
https://stackoverflow.com/questions/11107615
复制相似问题