Mac上安装nginx提示active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist

版权声明:作者已开启版权声明,如转载请注明转载地址。 https://blog.csdn.net/qq_34829447/article/details/86608797

博主今天在mac上执行brew install nginx-full --with-rtmp-module安装nginx,怎么调试都无法安装成功,一直提示xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist Use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools, or use `xcode-select --install` to install the standalone command line developer tools. See `man xcode-select` for more details.查阅资料发现问题所在

  • mac下卸载了xcode,就会发生默认开发工具路径错误的问题,需要执行以下命令重置系统默认开发工具路径
    sudo xcode-select -r
    xcode-select --switch /Library/Developer/CommandLineTools
    xcode-select -p
    
  • 执行nginx命令就会开启nginx服务器,并访问localhost:8080端口就可以看到服务器已开启
  • 关于nginx
    • 端口号是在配置文件 nginx.conf 里面配置的,默认端口是 8080 ,配置文件的位置 /usr/local/etc/nginx
    • 关闭nginx:sudo nginx -s stop
    • 重新加载nginx:sudo nginx -s reload
    • 如果出现端口冲突问题则需要修改nginx.conf文件的端口号

猜你喜欢

转载自blog.csdn.net/qq_34829447/article/details/86608797