天天看點

PHP Mac composer 安裝 valet

終端指令:

​​

​composer global require laravel/valet​

輸出

​​

​Changed current directory to /Users/apple/.composer​

​ 後,需要等待,等待…

成功後的日志:

Using version ^2.9 for laravel/valet
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 15 installs, 0 updates, 0 removals
  - Installing symfony/polyfill-mbstring (v1.15.0): Downloading (100%)         
  - Installing symfony/var-dumper (v5.0.6): Downloading (100%)         
  - Installing tightenco/collect (v6.18.3): Downloading (100%)         
  - Installing nategood/httpful (0.3.2): Downloading (100%)         
  - Installing symfony/process (v5.0.6): Downloading (100%)         
  - Installing psr/container (1.0.0): Downloading (100%)         
  - Installing php-di/invoker (2.0.0): Downloading (100%)         
  - Installing symfony/service-contracts (v2.0.1): Downloading (100%)         
  - Installing symfony/polyfill-php73 (v1.15.0): Downloading (100%)         
  - Installing symfony/console (v5.0.6): Downloading (100%)         
  - Installing mnapoli/silly (1.7.2): Downloading (100%)         
  - Installing psr/simple-cache (1.0.1): Downloading (100%)         
  - Installing illuminate/contracts (v7.3.0): Downloading (100%)         
  - Installing illuminate/container (v7.3.0): Downloading (100%)         
  - Installing laravel/valet (v2.9.0): Downloading (100%)         
symfony/var-dumper suggests installing ext-intl (To show region name in time zone dump)
symfony/service-contracts suggests installing symfony/service-implementation
symfony/console suggests installing symfony/event-dispatcher
symfony/console suggests installing symfony/lock
symfony/console suggests installing psr/log (For using the console logger)
Writing lock file
Generating autoload files
5 packages you are using are looking for funding.
Use the `composer fund` command to find out more!      

再執行 ​

​valet install​

​​ 報錯:​

​-bash: valet: command not found​

​ 解決:

1.​

​open ~/.bash_profile​

Password:
No log handling enabled - using stderr logging
Created directory: /var/db/net-snmp
Created directory: /var/db/net-snmp/mib_indexes
Stopping nginx...
Installing nginx configuration...
Installing nginx directory...
Installing php...
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
assh
bitrise
boost
cfn-lint
closure-compiler
dar
dependency-check
dnscrypt-proxy
dvc
go
godep
helm@2
innoextract
istioctl
joplin
keydb
minikube
openapi-generator
pueue
simple-scan
swift-format
traefik
traefik@1
vault
vim
yaegi
yamllint

[php] is not installed, installing it now via Brew... 🍻