0%

遇到的一些issues

Mac terminal权限问题 (zsh: permission denied)

原因:/usr/local can no longer be chown’d in High Sierra.

解决:

sudo chown -R $(whoami) $(brew --prefix)/*
然后重启terminal

SQL Error 168

SQLSTATE[HY000]: General error: 1030 Got error 168 - ‘Unknown (generic) error from engine’ from storage engine
重启MySQL服务就解决了。。

MySQL查看错误日志
tail /usr/local/mysql/data/mysqld.local.err

Composer卡住

换国内源 or VPN

Package xxx is abandoned..

以faker为例,替换package:替换faker package

Brew

1
2
3
4
5
6
7
8
9
10
11
brew services list
brew search xxx
brew install xxx
brew uninsall xxx
brew list
brew outdated
brew update
brew upgrade xxx
brew info xxx
brew deps
brew deps --installed --tree

Nginx

查看错误日志:vim /usr/local/var/log/nginx/error.log

Nginx:

• Add configs in -> /usr/local/etc/nginx/servers/
• Default config -> /usr/local/etc/nginx/nginx.conf
• Logs will be in -> /usr/local/var/log/nginx/
• Default webroot is -> /usr/local/var/www/
• Default listen address -> http://localhost:8080 (我改成了80)

mac卸载nginx?
Mac下卸载Nginx服务器

Valet的配置
Valet

Apache

Apache virtual host配置文件 /usr/local/etc/httpd/extra/httpd-vhosts.conf

• The php.ini file can be found in: /usr/local/etc/php/8.x/php.ini.
• Remember useful Apache 'brew services' commands.
$ brew services stop httpd
$ brew services start httpd
$ brew services restart httpd
• tail -f /usr/local/var/log/httpd/error_log (apache log)