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.

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

报告相同问题?

悬赏问题

  • ¥15 PointNet++的onnx模型只能使用一次
  • ¥20 西南科技大学数字信号处理
  • ¥15 有两个非常“自以为是”烦人的问题急期待大家解决!
  • ¥30 STM32 INMP441无法读取数据
  • ¥15 R语言绘制密度图,一个密度曲线内fill不同颜色如何实现
  • ¥100 求汇川机器人IRCB300控制器和示教器同版本升级固件文件升级包
  • ¥15 用visualstudio2022创建vue项目后无法启动
  • ¥15 x趋于0时tanx-sinx极限可以拆开算吗
  • ¥500 把面具戴到人脸上,请大家贡献智慧,别用大模型回答,大模型的答案没啥用
  • ¥15 任意一个散点图自己下载其js脚本文件并做成独立的案例页面,不要作在线的,要离线状态。