在Mac上使用Nginx的乘客无法启动

时间:2019-02-19 17:48:44

标签: nginx rvm passenger

我在Mac上安装了Nginx和Passenger,并启动了Nginx,但出现此错误。

     [passenger_native_support.bundle] trying to compile for the current user (_unknown) and Ruby interpreter...
     (set PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY=0 to disable)
/Users/ssk/.rvm/rubies/ruby-2.4.4/lib/ruby/2.4.0/fileutils.rb:230:in `mkdir': Operation not permitted @ dir_s_mkdir - /var/empty/.passenger (Errno::EPERM)
    from /Users/ssk/.rvm/rubies/ruby-2.4.4/lib/ruby/2.4.0/fileutils.rb:230:in `fu_mkdir'
    from /Users/ssk/.rvm/rubies/ruby-2.4.4/lib/ruby/2.4.0/fileutils.rb:208:in `block (2 levels) in mkdir_p'
    from /Users/ssk/.rvm/rubies/ruby-2.4.4/lib/ruby/2.4.0/fileutils.rb:206:in `reverse_each'
    from /Users/ssk/.rvm/rubies/ruby-2.4.4/lib/ruby/2.4.0/fileutils.rb:206:in `block in mkdir_p'
    from /Users/ssk/.rvm/rubies/ruby-2.4.4/lib/ruby/2.4.0/fileutils.rb:191:in `each'
    from /Users/ssk/.rvm/rubies/ruby-2.4.4/lib/ruby/2.4.0/fileutils.rb:191:in `mkdir_p'
    from /usr/local/Cellar/passenger/6.0.1/libexec/src/ruby_supportlib/phusion_passenger/native_support.rb:299:in `mkdir'
    from /usr/local/Cellar/passenger/6.0.1/libexec/src/ruby_supportlib/phusion_passenger/native_support.rb:377:in `block in try_directories'
    from /usr/local/Cellar/passenger/6.0.1/libexec/src/ruby_supportlib/phusion_passenger/native_support.rb:375:in `each'
    from /usr/local/Cellar/passenger/6.0.1/libexec/src/ruby_supportlib/phusion_passenger/native_support.rb:375:in `each_with_index'
    from /usr/local/Cellar/passenger/6.0.1/libexec/src/ruby_supportlib/phusion_passenger/native_support.rb:375:in `try_directories'
    from /usr/local/Cellar/passenger/6.0.1/libexec/src/ruby_supportlib/phusion_passenger/native_support.rb:333:in `compile'
    from /usr/local/Cellar/passenger/6.0.1/libexec/src/ruby_supportlib/phusion_passenger/native_support.rb:219:in `compile_and_load'
    from /usr/local/Cellar/passenger/6.0.1/libexec/src/ruby_supportlib/phusion_passenger/native_support.rb:52:in `start'
    from /usr/local/Cellar/passenger/6.0.1/libexec/src/ruby_supportlib/phusion_passenger/native_support.rb:443:in `<top (required)>'
    from /Users/ssk/.rvm/rubies/ruby-2.4.4/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /Users/ssk/.rvm/rubies/ruby-2.4.4/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /usr/local/Cellar/passenger/6.0.1/libexec/src/ruby_supportlib/phusion_passenger.rb:243:in `require_passenger_lib'
    from /usr/local/Cellar/passenger/6.0.1/libexec/src/ruby_supportlib/phusion_passenger/preloader_shared_helpers.rb:29:in `<top (required)>'
    from /Users/ssk/.rvm/rubies/ruby-2.4.4/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /Users/ssk/.rvm/rubies/ruby-2.4.4/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /usr/local/Cellar/passenger/6.0.1/libexec/src/ruby_supportlib/phusion_passenger.rb:243:in `require_passenger_lib'
    from /usr/local/Cellar/passenger/6.0.1/libexec/src/helper-scripts/rack-preloader.rb:57:in `init_passenger'
    from /usr/local/Cellar/passenger/6.0.1/libexec/src/helper-scripts/rack-preloader.rb:183:in `<module:App>'
    from /usr/local/Cellar/passenger/6.0.1/libexec/src/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
    from /usr/local/Cellar/passenger/6.0.1/libexec/src/helper-scripts/rack-preloader.rb:29:in `<main>'

我无法chmod / var / empty,因为它是操作系统保护的文件夹。

可以请教吗?

0 个答案:

没有答案