Macbook m1 Big Sur 安装Valet 运行yii2

Posted buildyuan

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Macbook m1 Big Sur 安装Valet 运行yii2相关的知识,希望对你有一定的参考价值。

准备工作

假定你已经在本机安装完成了 brew / composer / php

检查环境变量

$echo $PATH | grep composer

#如果没有,添加环境变量
$export PATH=~/.composer/vendor/bin:$PATH
#检查一下
$echo $PATH | grep composer
/Users/yourname/.composer/vendor/bin:

全局安装Valet

$composer global require laravel/valet
Changed current directory to /Users/yuanjian/.composer
Using version ^2.14 for laravel/valet
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 22 installs, 0 updates, 0 removals
  - Installing symfony/polyfill-php80 (v1.22.1): Loading from cache
  - Installing symfony/polyfill-mbstring (v1.22.1): Loading from cache
  - Installing symfony/polyfill-php72 (v1.22.1): Loading from cache
  - Installing symfony/var-dumper (v4.4.21): Downloading (100%)         
  - Installing tightenco/collect (v8.0.4): Downloading (100%)         
  - Installing nategood/httpful (0.2.20): Downloading (100%)         
  - Installing symfony/process (v4.4.20): Loading from cache
  - Installing psr/container (1.0.0): Loading from cache
  - Installing php-di/invoker (2.0.0): Downloading (100%)         
  - Installing symfony/service-contracts (v1.1.9): Downloading (100%)         
  - Installing symfony/polyfill-php73 (v1.22.1): Loading from cache
  - Installing symfony/console (v4.4.21): Loading from cache
  - Installing mnapoli/silly (1.7.2): Downloading (100%)         
  - Installing psr/simple-cache (1.0.1): Loading from cache
  - Installing symfony/translation-contracts (v1.1.10): Downloading (100%)         
  - Installing symfony/translation (v4.4.21): Downloading (100%)         
  - Installing nesbot/carbon (2.46.0): Downloading (100%)         
  - Installing doctrine/inflector (1.3.1): Downloading (100%)         
  - Installing illuminate/contracts (v5.8.36): Downloading (100%)         
  - Installing illuminate/support (v5.8.36): Downloading (100%)         
  - Installing illuminate/container (v5.8.36): Downloading (100%)         
  - Installing laravel/valet (v2.14.1): Downloading (100%)         
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)
symfony/translation suggests installing symfony/config
symfony/translation suggests installing symfony/yaml
illuminate/support suggests installing illuminate/filesystem (Required to use the composer class (5.8.*).)
illuminate/support suggests installing moontoast/math (Required to use ordered UUIDs (^1.1).)
illuminate/support suggests installing ramsey/uuid (Required to use Str::uuid() (^3.7).)
illuminate/support suggests installing vlucas/phpdotenv (Required to use the env helper (^3.3).)
Writing lock file
Generating autoload files
11 packages you are using are looking for funding.
Use the `composer fund` command to find out more!

Valet install

这将配置并安装 Valet 和 DnsMasq。此外,Valet 依赖的守护程序将配置为在系统启动时启动:

$valet install
Stopping nginx...
Installing nginx...
[nginx] is not installed, installing it now via Brew... 

以上是关于Macbook m1 Big Sur 安装Valet 运行yii2的主要内容,如果未能解决你的问题,请参考以下文章

无法在 M1 MacBook Big Sur 中安装 mysql2 0.5.3

错误:命令“clang”失败,退出状态为 1:在 MacOS Big Sur M1 上安装熊猫

Mac M1 Big Sur 上的错误“dlsym(0x7f8ffd410a90, Init_bigdecimal): symbol not found”

Xdebug MacOS Big Sur M1(ARM)

mac Big Sur 芯片m1上安装ps,窗口里没有扩展,用不了插件了怎么办?

Cocoapods 无法在新的 m1 mac Big Sur Xcode 上运行