Installation instructions are provided in Laravel Chinese document, but any errors reported during installation are recorded here.
The following is the document installation method
The installation
Note: The installed skip directly to the upgrade section.
Valet requires a Mac operating system and Homebrew is installed. Before installing, also ensure that no other programs such as Apache or Nginx are bound to port 80 locally. The installation steps are as follows:
- use
brew update
Install or update Homebrew to the latest version; - Install PHP 7.3 from Homebrew:
brew install php
; - Install the Composer;
- Install Valet by Composer:
composer global require laravel/valet
(make sure~/.composer/vendor/bin
Directory in system path); - run
valet install
Command, which will configure and install Valet and DnsMasq, and then register Valet to start randomly in the background.
After Valet is installed, try ping any *.test domain name on your terminal using a command like ping foobar.test. If Valet is installed correctly, you’ll see a response from 127.0.0.1
1. Following the first step of the documentation, Homebrew was installed, but an error was reported at the beginning
/bin/bash -c “$(curl -fsSL Raw.githubusercontent.com/Homebrew/in…)”
curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused
Referring to the post, I found a solution. I adopted the first method in the post:
(1) open the website: https://www.ipaddress.com/
Check theraw.githubusercontent.com
Corresponding IP address(2) Replace the system host file
Note: It is best to make a copy out before making changesHere is actually equivalent to the solution of network failure, a website can be opened on your computer, not open we will ping terminal (DOS system) take an example:If github is enabled, you can check whether github is enabled. (The same is true when telecom companies check for network problems, looking for lost packets.)
(3) and then perform the installation/bin/bash – c “$(curl – fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)” explain: This line/bin/bash – c “$(curl – fsSL raw.githubusercontent.com/Homebrew/in… Install Homebrew command, the official website address you can view.
It’s been a long wait…
The following error may occur at the end of the previous step or at this step, or other errors may occur. It is said that network problems or can be solved by replacing the mirror
Fatal: Unable to access ‘github.com/Homebrew/br… ‘: LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
And I basically just re-execute the command
3. Brew install PHP, another long wait (several hours…….)
4. In the fourth step, instead of using the above link, Composer was installed in Chinese. Everything went well, but this small step should not be missed
5. Step 5 Composer Global require Laravel/Valet
6. Run valet install
Command not found: Valet error, look at step 5, (make sure ~/. Composer /vendor/bin directory is in the system path), search online for a solution
Valet Command not found. The valet command was not added to the environment variable. If no error message is displayed, ignore the following information. # add valet to environment variable # 1. Edit the profile, if the file does not exist it is automatically created, so even if the file is open, just continue to vi ~/.bash_profile # 2. Any place in the following file to add the following the export PATH = "$PATH:$HOME/.com be/vendor/bin" # 3. Source ~/.bash_profile # Run valet install againCopy the code
This step fails to execute valet install
Error: Your CLT does not support macOS 11.1.
It is either outdated or was modified.
Please update your CLT or delete it if no updates are available.
In Brew.php line 168:
Brew was unable to install [nginx].
May be using the latest system, prompt to update CLT, more
7. If the installation is successful, run the ping foobar.test command to check whether there is no problem