phusion / passenger

A fast and robust web server and application server for Ruby, Python and Node.js
https://www.phusionpassenger.com/
MIT License
4.98k stars 546 forks source link

Missing PCRE headers when trying to run Passenger 6.0.9, but PCRE installed #2369

Open victorbstan opened 2 years ago

victorbstan commented 2 years ago

Issue report

Question 1: What is the problem?

Running passenger local development computer, OSX Big Sur, M1: standalone passenger is installed, but it tries to install NgineX on first run of a rails app. Requirement specified as: gem "passenger", ">= 5.3.2", require: "phusion_passenger/rack_handler" in Gemfile.

The installer fails the last check:

victor@Victors-Air clipper % rails s
=> Booting Passenger application server
=> Rails 6.1.3.2 application starting in development http://localhost:3000
=> Run `bin/rails server --help` for more startup options
The Phusion Passenger(R) agent is already installed.

 --> Installing Nginx 1.20.1 engine
     Could not download https://github.com/phusion/passenger/releases/download/release-6.0.9/nginx-1.20.1-a-macosx-11.4.tar.gz: The requested URL returned error: 404
     Trying next mirror...
     Could not download https://oss-binaries.phusionpassenger.com/binaries/passenger/by_release/6.0.9/nginx-1.20.1-a-macosx-11.4.tar.gz: The requested URL returned error: 404
     Trying next mirror...
     Could not download https://s3.amazonaws.com/phusion-passenger/binaries/passenger/by_release/6.0.9/nginx-1.20.1-a-macosx-11.4.tar.gz: The requested URL returned error: 403 Forbidden
     ------------------------------------------
     Sorry, no precompiled Nginx 1.20.1 engine is available for your platform.

---------------------------------------

No precompiled Nginx engine could be downloaded. Compiling it from source instead.

Checking for required software...

 * Checking for C compiler...
      Found: yes
      Location: /usr/bin/cc
 * Checking for C++ compiler...
      Found: yes
      Location: /usr/bin/c++
 * Checking for GNU make...
      Found: yes
      Location: /usr/bin/make
 * Checking for Rake (associated with /Users/victor/.rbenv/versions/3.0.1/bin/ruby)...
      Found: yes
      Location: /Users/victor/.rbenv/versions/3.0.1/bin/ruby /Users/victor/.rbenv/versions/3.0.1/bin/rake
 * Checking for OpenSSL development headers...
      Found: yes
      Location: /opt/homebrew/opt/openssl/include/openssl/ssl.h
 * Checking for Zlib development headers...
      Found: yes
      Location: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/zlib.h
 * Checking for PCRE development headers...
      Found: no

Question 4: Passenger installation method:

Your answer:

Question 5: Your app's programming language (including any version managers) and framework (including versions):

Your answer: Bundler, Rails 6, ruby 3.0.1p64

Question 6: Are you using a PaaS and/or containerization? If so which one?

Your answer: No, local development machine Mac, M1 chip.

CamJN commented 2 years ago

Can you verify that the pcre headers are located at /opt/homebrew/include as well as /opt/homebrew/opt/pcre/include? Also I'm not 100% sure if Nginx will pick up the headers on apple silicon, they don't look for them: https://github.com/nginx/nginx/blob/master/auto/lib/pcre/conf but i'll try.

CamJN commented 2 years ago

9c708440 attempts to address this, let me know if it works (in 6.0.11).

stoem commented 3 days ago

I've just run into this issue on an Apple M2 running MacOS 13.1 when trying to run install and then run Passenger >= 6.0.20.

Currently cannot get past

Checking for PCRE2 development headers...
      Found: no

Running brew install pcre2 did not help.

The files pcre2.h and pcre2posix.h are present at /opt/homebrew/include

CamJN commented 14 hours ago

I believe this is fixed by https://github.com/phusion/passenger/commit/86b26de4d1b71ea7a1bece2e62e452376bcd8b7a in the upcoming release.