【发布时间】:2022-10-20 16:00:53
【问题描述】:
我正在尝试通过 Curl 安装 Laravel,以便像这样将 Laravel Sail 与 docker 一起使用
curl -s https://laravel.build/example-app | bash
但我得到这个错误
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 947 0 947 0 0 947 0 --:--:-- --:--:-- --:--:-- 1835
: ambiguous redirect
-bash: line 2: $'\r': command not found
-bash: line 35: syntax error: unexpected end of file
为什么我会得到这个以及如何解决它?
【问题讨论】:
-
您是否在 WSL 终端上运行该命令?参考:laravel.com/docs/8.x#getting-started-on-windows
-
windows powershell终端
-
我使用了默认的 CMD 并开始下载,但是当它要求输入密码时,它什么也没做,当我按 CTRL+C 时,我发现它正在尝试将密码作为命令执行
-
查看您尝试执行的脚本,您似乎应该从 WSL 而不是 Windows 运行它:laravel.build/example-app
标签: bash docker curl laravel-sail