0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

valet install でこけた

Posted at

valet installでこけた。
その忘備録、記録をまとめるためにこちらにインストールするまでの経緯を記述します。

エラー内容

In Brew.php line 204:
                                          
  Homebrew PHP appears not to be linked.  
                                          

install

PHPが紐付けされてないから失敗してるっぽい

対応方法

ググる

参考:(Mac)ローカルに手動でValet+Laravel環境を作成する手順

brew link php72 --forceで紐付けをしてみた。

$ brew link php72 --force

Linking /usr/local/Cellar/php@7.2/7.2.24... 
Error: Could not symlink sbin/php-fpm
/usr/local/sbin is not writable.

/usr/local/sbinが無いと怒られた。

sbinってなんだ。。

本当に無いのかみる

$ ls -la  /usr/local

なかったのでとりあえず作ってみた。

$ sudo  mkdir -p /usr/local/sbin 
$ sudo chown -R $(whoname):admin /usr/local/sbin  

もう一回brew link php72 --forceを実行

brew link php72 --force

Linking /usr/local/Cellar/php@7.2/7.2.24... 25 symlinks created

If you need to have this software first in your PATH instead consider running:
  echo 'set -g fish_user_paths "/usr/local/opt/php@7.2/bin" $fish_user_paths' >> ~/.config/fish/config.fish
  echo 'set -g fish_user_paths "/usr/local/opt/php@7.2/sbin" $fish_user_paths' >> ~/.config/fish/config.fish

言われた通りにコマンドを叩く。

$ echo 'set -g fish_user_paths "/usr/local/opt/php@7.2/bin" $fish_user_paths' >> ~/.config/fish/config.fish
$ echo 'set -g fish_user_paths "/usr/local/opt/php@7.2/sbin" $fish_user_paths' >> ~/.config/fish/config.fish

もっかいvalet install

$ valet install 

Stopping nginx...
Installing nginx configuration...
Installing nginx directory...
Updating PHP configuration...
Restarting php@7.2...
Installing dnsmasq...
[dnsmasq] is not installed, installing it now via Brew... 🍻
Restarting dnsmasq...
Valet is configured to serve for TLD [.test]
Restarting nginx...

できた!!!!!!

けど、実際問題力技で/usr/local/sbinを作って良いのかは謎。。。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?