Giu*_*ria 7 php macos shell composer-php
我试图在我的macOS版本上安装Composer: high sierra--> 10.13.4
但使用命令后:
sudo php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
Run Code Online (Sandbox Code Playgroud)
它创建了一些文件和目录,但它没有下载作曲家.我的终端显示以下错误:
未启用日志处理 - 使用stderr日志记录
创建目录:/ var/db/net-snmp
创建目录:/ var/db/net-snmp/mib_indexes`
我该如何解决这个问题?
Luk*_*kas 21
首先在你的MAC上安装Brew:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Run Code Online (Sandbox Code Playgroud)
然后安装PHP:
brew update
brew install php
brew install composer
Run Code Online (Sandbox Code Playgroud)
要测试安装,请运行:
$ composer -V
Run Code Online (Sandbox Code Playgroud)