i have reinstall valet, but stuck on this step, any one help me?
i just trty for, reinstall ngix but still my error
Nginx cannot start; please check your nginx.conf [1: nginx: [emerg] open() "/usr/local/etc/nginx/mime.types" failed (2
: No such file or directory) in /usr/local/etc/nginx/nginx.conf:9
nginx: configuration file /usr/local/etc/nginx/nginx.conf test failed
].
nginx version: nginx/1.17.9
built by clang 11.0.0 (clang-1100.0.33.17)
built with OpenSSL 1.1.1d 10 Sep 2019
TLS SNI support enabled
configure arguments: --prefix=/usr/local/Cellar/nginx/1.17.9 --sbin-path=/usr/local/Cellar/nginx/1.17.9/bin/nginx --with-cc-opt='-I/usr/local/opt/pcre/include -I/usr/local/opt/[email protected]/include' --with-ld-opt='-L/usr/local/opt/pcre/lib -L/usr/local/opt/[email protected]/lib' --conf-path=/usr/local/etc/nginx/nginx.conf --pid-path=/usr/local/var/run/nginx.pid --lock-path=/usr/local/var/run/nginx.lock --http-client-body-temp-path=/usr/local/var/run/nginx/client_body_temp --http-proxy-temp-path=/usr/local/var/run/nginx/proxy_temp --http-fastcgi-temp-path=/usr/local/var/run/nginx/fastcgi_temp --http-uwsgi-temp-path=/usr/local/var/run/nginx/uwsgi_temp --http-scgi-temp-path=/usr/local/var/run/nginx/scgi_temp --http-log-path=/usr/local/var/log/nginx/access.log --error-log-path=/usr/local/var/log/nginx/error.log --with-compat --with-debug --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_degradation_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-ipv6 --with-mail --with-mail_ssl_module --with-pcre --with-pcre-jit --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module
valet -V
Laravel Valet 2.8.1
nginx -s reload
nginx: [alert] could not open error log file: open() "/usr/local/var/log/nginx/error.log" failed (13: Permission denied)
2020/03/11 11:39:31 [warn] 76687#0: the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /usr/local/etc/nginx/nginx.conf:1
2020/03/11 11:39:31 [emerg] 76687#0: open() "/usr/local/etc/nginx/mime.types" failed (2: No such file or directory) in /usr/local/etc/nginx/nginx.conf:9
brew install nginx
==> Downloading https://homebrew.bintray.com/bottles/nginx-1.17.9.catalina.bottle.tar.gz
Already downloaded: /Users/a/Library/Caches/Homebrew/downloads/31fec6e83b749c53c91d0796d695ae4717f21616ecca4510802b4eba864acca2--nginx-1.17.9.catalina.bottle.tar.gz
==> Pouring nginx-1.17.9.catalina.bottle.tar.gz
Warning: The post-install step did not complete successfully
You can try again usingbrew postinstall nginx`
==> Caveats
Docroot is: /usr/local/var/www
The default port has been set in /usr/local/etc/nginx/nginx.conf to 8080 so that
nginx can run without sudo.
nginx will load all files in /usr/local/etc/nginx/servers/.
To have launchd start nginx now and restart at login:
brew services start nginx
Or, if you don't want/need a background service you can just run:
nginx
==> Summary
馃嵑 /usr/local/Cellar/nginx/1.17.9: 27 files, 2.1MB`
brew postinstall nginx --debug
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/nginx.rb
==> Postinstalling nginx
Warning: The post-install step did not complete successfully
You can try again usingbrew postinstall nginx
==> An exception occurred within a child process:
Errno::EACCES: Permission denied @ rb_sysopen - /usr/local/etc/nginx/fa
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:1386:ininitialize'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:1386:in open'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:1386:inblock in copy_file'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:1385:in open'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:1385:incopy_file'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:492:in copy_file'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:419:inblock in cp'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:1557:in block in fu_each_src_dest'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:1573:infu_each_src_dest0'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:1555:in fu_each_src_dest'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:418:incp'
/usr/local/Homebrew/Library/Homebrew/extend/pathname.rb:209:in cp_path_sub'
/usr/local/Homebrew/Library/Homebrew/install_renamed.rb:16:incp_path_sub'
/usr/local/Homebrew/Library/Homebrew/formula.rb:1006:in block (2 levels) in run_post_install'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/find.rb:49:inblock (2 levels) in find'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/find.rb:48:in catch'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/find.rb:48:inblock in find'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/find.rb:43:in each'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/find.rb:43:infind'
/usr/local/Homebrew/Library/Homebrew/formula.rb:1003:in block in run_post_install'
/usr/local/Homebrew/Library/Homebrew/utils.rb:478:inwith_env'
/usr/local/Homebrew/Library/Homebrew/formula.rb:999:in run_post_install'
/usr/local/Homebrew/Library/Homebrew/postinstall.rb:21:in
Thanks In Advance
Line 9 of your nginx.conf is doing its normal task of trying to load the mime.types file, but the file does not exist.
The post-install process shows that it ran into a permissions error while trying to copy files.
This suggests that you have some ownership/permission differences in the homebrew "stuff".
I recommend the following, which will destructively remove several things in the process:
brew remove nginx
sudo rm -rf /usr/local/Cellar/nginx /usr/local/var/log/nginx /usr/local/etc/nginx
sudo chown -R $(whoami):admin $(brew --prefix)/*
brew services cleanup
brew doctor
And then ask valet to install nginx again as part of its usual install process:
valet install
drbyte! You saved me! After updating my Apple Developer Transition Kit's Big Sur to OS 11 Beta 6, Nginx started failing to start with an errorless exception. dnsmasq as well needed to be fully removed and reinstalled.
Valet works again! WOOP WOOP!
OS 11 Beta 7 update broke Nginx again. We should probably figure out what about the updates is causing Homebrew installed Nginx to break. I'm assuming dnsmasq broke too, haven't tried to repair it yet. I don't even know who to report this to yet. I am using an Apple Developer Transition Kit with an Apple ARM chip (not Intel) if that makes a difference.
The error in terminal is:
'sudo nginx -t' terminated by signal SIGKILL (Forced quit)
and
'sudo nginx' terminated by signal SIGKILL (Forced quit)
no errors in /usr/local/var/log/nginx/error.log
I would use docker, but Apple ARM Silicon doesn't support virtualization yet.
Most helpful comment
Line 9 of your nginx.conf is doing its normal task of trying to load the mime.types file, but the file does not exist.
The post-install process shows that it ran into a permissions error while trying to copy files.
This suggests that you have some ownership/permission differences in the homebrew "stuff".
I recommend the following, which will destructively remove several things in the process:
brew remove nginxsudo rm -rf /usr/local/Cellar/nginx /usr/local/var/log/nginx /usr/local/etc/nginxsudo chown -R $(whoami):admin $(brew --prefix)/*brew services cleanupbrew doctorAnd then ask valet to install nginx again as part of its usual install process:
valet install