doufu5747 2015-11-08 20:43
浏览 48
已采纳

Composer / Laravel安装:我的命令行不再理解PATH

running mac Yosemite 10.10.5

A couple of days ago I installed Laravel for the first time. That part went pretty smooth! Once it was time to install composer I was able to find some help here! This command on bash Profile made it work for me: PATH="$PATH:~/.composer/vendor/bin"

Fast-Forward to today when I am attempting to install XAMPP and Bitnami.. The Apache server and all that. So I think I am ready to roll and as I tried to create a project I was told that I did not have the mcrypt file? So down THAT rabbit hole I went. That was a tough one but I managed to get it to work.

Now forgive me but I don't remember what happened next that led me to re-install composer and that turned out to be an other huge issue as it wouldn't allow me to do so.. I would get this message

Some settings on your machine make Composer unable to work properly.
Make sure that you fix the issues listed below and run this script again:
The detect_unicode setting must be disabled.
Add the following to the end of your `php.ini`:
    detect_unicode = Off

After doing some research I was able to download Composer again by running this command..

curl -s getcomposer.org/installer | php -d detect_unicode=Off

I thought I was on my way.. 2 hours have gone by! Boy was I wrong! :( What once used to work.. composer commands in my terminal.. all of the sudden are not recognized..

Commands like this worked before.. composer create-project laravel/laravel=5.0 TestApp

but now it returns this.. ??+?abelista /Applications/XAMPP/htdocs Question Marks along my machines name..

Nothing with composer runs.. I have tried changing my PATH in my Bash Profile too..

PATH="$PATH:$HOME/.composer/vendor/bin"

PATH="~/.composer/vendor/bin/laravel:$PATH"

and remember this one below used to work..

PATH="$PATH:~/.composer/vendor/bin"

From my understanding.. If I can recall correctly.. I think the problem began when I ran homebrew to install mcrypt.. I could be wrong. Does anyone here have the slightest idea what could be my issue?

BTW, according to my command line.. composer is installed..

All settings correct for using Composer
Downloading...

Composer successfully installed to: /Applications/XAMPP/xamppfiles/htdocs/composer.phar
Use it: php composer.phar

Thanks for reading and trying to help me out.

  • 写回答

1条回答 默认 最新

  • dop20345 2015-11-08 21:32
    关注

    I think you've messed up with PHP installing XAMPP or other tools...

    Nothing to do with composer. If you want something to work, try using Homestead, everything is setup for you in there.

    In general, I would recommend you to not install stuff directly on your development machine. Try using virtual machines instead, that way you can do all the mess you want and reset everything easily.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来
  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效
  • ¥15 悬赏!微信开发者工具报错,求帮改