Comments (27)
From jballanc on April 11, 2008 21:59:47
I just ran into this issue as well. For me, changing variable name to APXS did not help. Moving the alternate bin
directory (/opt/local/apache2/bin on my system) to the front of the PATH in tcsh did fix the issue.
from passenger.
From honglilai on April 12, 2008 00:51:55
Thanks for the report. We'll take a closer look after the weekend.
Cc: honglilai
from passenger.
From honglilai on April 13, 2008 12:24:46
Could you run the following commands and tell me what you see?
ruby -rubygems -e 'gem "passenger"; require "passenger/platform_info"; puts
PlatformInfo::APXS2'
export APXS2=/path/to/your/apxs2
ruby -rubygems -e 'gem "passenger"; require "passenger/platform_info"; puts
PlatformInfo::APXS2'
Thanks.
from passenger.
From iwarshak on April 13, 2008 14:21:26
For me, I got blank lines both times.
from passenger.
From honglilai on April 13, 2008 14:43:55
What do you see if you run the following Ruby script?
require 'rubygems'
gem 'passenger'
require 'passenger/platform_info'
module PlatformInfo
puts "ENV['APXS2'] = #{ENV['APXS2'].inspect}"
puts "find_apxs2 -> #{find_apxs2.inspect}"
puts "env_defined?('APXS2') -> #{env_defined?('APXS2').inspect}"
end
from passenger.
From iwarshak on April 13, 2008 18:54:35
Without setting APXS2 variable:
ENV['APXS2'] = nil
find_apxs2 -> "/usr/sbin/apxs"
env_defined?('APXS2') -> false
after setting APXS2 env var
ENV['APXS2'] = nil
find_apxs2 -> "/usr/sbin/apxs"
env_defined?('APXS2') -> false
after setting APXS env var
ENV['APXS2'] = "/Users/ian/Desktop/passenger-bin/bin/apxs"
find_apxs2 -> "/Users/ian/Desktop/passenger-bin/bin/apxs"
env_defined?('APXS2') -> true
Hope this helps.
from passenger.
From iwarshak on April 13, 2008 19:21:09
WITH APXS2 set
ENV['APXS2'] = "/Users/ian/Desktop/passenger-bin/bin/apxs"
find_apxs2 -> "/Users/ian/Desktop/passenger-bin/bin/apxs"
env_defined?('APXS2') -> true
WITHOUT APXS2 set
ENV['APXS2'] = nil
find_apxs2 -> "/usr/sbin/apxs"
env_defined?('APXS2') -> false
from passenger.
From jballanc on April 13, 2008 20:57:33
Switching to bash and running the commands also gave me two blank lines (this is using the default PATH, I
normally use tcsh, so I don't have bash configured for MacPorts, etc.).
Under tcsh I get the following
ruby -rubygems -e 'gem "passenger"; require "passenger/platform_info"; puts PlatformInfo::APXS2'
/usr/sbin/apxs
setenv APXS2 /opt/local/apache2/bin/apxs
/opt/local/apache2/bin/apxs
ruby -rubygems -e 'gem "passenger"; require "passenger/platform_info"; puts PlatformInfo::APXS2'
from passenger.
From honglilai on April 14, 2008 01:40:30
iwarshak: How come that you get 2 different results when you set APXS2? Did you use a
different shell?
Which shell are you using, and which OS X version?
from passenger.
From cianhughes on April 16, 2008 15:59:37
Just a thought here, might people be setting the variable as a non-root user, then running sudo passenger- install-apache2-module
?
Remember that sudo no longer passes environment variable through by default:
% export VAR=foo
% echo $VAR
foo
% sudo echo $VAR
nothing
All the best, loving passenger...
from passenger.
From iwarshak on April 17, 2008 08:27:15
honglilai: Which test output are you referring to?
from passenger.
From honglilai on April 17, 2008 14:25:39
iwarshak:
after setting APXS2 env var
ENV['APXS2'] = nil
find_apxs2 -> "/usr/sbin/apxs"
env_defined?('APXS2') -> false
vs
WITH APXS2 set
ENV['APXS2'] = "/Users/ian/Desktop/passenger-bin/bin/apxs"
find_apxs2 -> "/Users/ian/Desktop/passenger-bin/bin/apxs"
env_defined?('APXS2') -> true
from passenger.
From iwarshak on April 17, 2008 14:34:33
honglilai:
I see. I must have mistakingly posted that twice. Here are my results again.
Without APXS or APXS2 set
ENV['APXS2'] = nil
find_apxs2 -> "/usr/sbin/apxs"
env_defined?('APXS2') -> false
WITH APXS set
ENV['APXS2'] = nil
find_apxs2 -> "/usr/sbin/apxs"
env_defined?('APXS2') -> false
=> nil
WITH APXS2 set
ENV['APXS2'] = "/Users/ian/Desktop/passenger-bin/bin/apxs"
find_apxs2 -> "/Users/ian/Desktop/passenger-bin/bin/apxs"
env_defined?('APXS2') -> true
from passenger.
From honglilai on April 19, 2008 06:18:01
It seems that APXS2 is picked up just fine.
Could you show the exact commands that you typed while installing Passenger, as well
as the associated output?
from passenger.
From honglilai on April 22, 2008 11:07:52
I can't reproduce this problem at all, on any Macs that I've tried. Can anyone else
reliably reproduce this?
Labels: NeedsConfirmation
from passenger.
From jballanc on April 22, 2008 11:21:01
I just installed passenger on two different machines using BASH with no further issues. I think the issue I was
seeing was potentially due to either the quirks of that machine (PATH is a bit of a mess) or quirks in TCSH.
However, I would like to advocate for an alternative mechanisms for indicating non-standard Apache2
installs. For example something like:
sudo passenger-install-apache2-module --with-apxs2=/opt/local/apache2/bin/apxs
seems a bit more in keeping with the gem/mkmf model. Also, this would avoid the confusion of setting
variables and not having them passed to the sudo environment.
Either way, three machines and three successful installs later...THANK YOU!
from passenger.
From honglilai on April 22, 2008 11:34:00
Summary: Commandline option should be provided to set apxs2's and apr-config's path (was: APXS variable needs to be set, not APXS2 (Mac OSX))
Labels: -Type-Defect -NeedsConfirmation Type-Enhancement
from passenger.
From rowan.hick on April 30, 2008 13:33:55
CentOS5 64bit, couldn't install with default configuration, or setting the APXS as per the instructions. I had to
put in /usr/local/apache/bin/ in the path to get it to work.
Ruby 1.8.6, rubygems 0.9.4 (I think.. would have to go look), vanilla servers, this is on two different machines
behaving like this. Passenger 1.0.3.
from passenger.
From honglilai on April 30, 2008 13:55:58
rowan.hick, could you show the exact commands that you typed to show that APXS2
didn't work?
from passenger.
From johnny.rodgers on May 07, 2008 22:38:02
I'm attempting to install Passenger using MAMP as well. My PATH and APXS2 variables are:
PATH=/Users/Home/ruby-1.8.5/bin
APXS2=/Applications/MAMP/Library/bin/apxs
The gem installs fine, but I can't figure out how to set the variables above for the
root user, so that when I run passenger-install-apache2-module it will use the
correct Ruby and Apache installs.
When I run passenger-install-apache2-module as "Home", it starts up and picks the
correct Apache install:
Checking for required software...
- GNU C++ compiler... found at /usr/bin/g++
- Ruby development headers... found
- OpenSSL support for Ruby... found
- RubyGems... found
- Rake... found at /usr/local/bin/rake
- Apache 2... found at /Applications/MAMP/Library/bin/httpd
- Apache 2 development headers... found at /Applications/MAMP/Library/bin/apxs
- Apache Portable Runtime (APR) development headers... found at /usr/bin/apr-1-config
* fastthread... found
Permission problems
This installer must be able to write to the following directory:
/usr/local/lib/ruby/gems/1.8/gems/passenger-1.0.5
But it can't do that, because you're running the installer as Home.
Please re-run this installer as root.
But then when I run as root (sudo passenger-install-apache2-module), it does not
retrieve the same vars:
Checking for required software...
- GNU C++ compiler... found at /usr/bin/g++
- Ruby development headers... found
- OpenSSL support for Ruby... found
- RubyGems... found
- Rake... found at /usr/local/bin/rake
- Apache 2... found at /usr/sbin/httpd
- Apache 2 development headers... found at /usr/sbin/apxs
- Apache Portable Runtime (APR) development headers... found at
/Developer/SDKs/MacOSX10.5.sdk/usr/bin/apr-1-config
* fastthread... found
Compiling and installing Apache 2 module...
I can see that my problem is what cianhughes pointed out above in comment 10. So how
do I set those two variables for the root user so that they are recognized by the
installer when it is run as root?
Thanks a lot for your help! Passenger looks great.
from passenger.
From honglilai on May 08, 2008 00:40:59
johnny.rodgers:
sudo bash
passenger-install-apache2-module
from passenger.
From johnny.rodgers on May 08, 2008 14:31:49
Thanks - however when I run that I get:
bash: passenger-install-apache2-module: command not found
Here is a transcript:
Macintosh-35:~ Home$ sudo bash
bash-3.2# echo $PATH
/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
bash-3.2# export PATH=/Users/Home/ruby-1.8.5/bin
bash-3.2# echo $PATH
/Users/Home/ruby-1.8.5/bin
bash-3.2# echo $APXS2
bash-3.2# export APXS2=/Applications/MAMP/Library/bin/apxs
bash-3.2# echo $APXS2
/Applications/MAMP/Library/bin/apxs
bash-3.2# passenger-install-apache2-module
bash: passenger-install-apache2-module: command not found
bash-3.2#
If I run passenger-install-apache2-module immediately after sudo bash (without
exporting PATH and APXS2), I get the module installer, but with the default variables
rather than those exported. I realize that these aren't issues, but products of my
lack of knowledge with bash, but I haven't been able to find a clear answer anywhere
else, so I would really appreciate anything you can offer. Thanks again.
from passenger.
From dmitry.sychov on June 08, 2009 05:24:03
i vote for
"sudo passenger-install-apache2-module --with-apxs2=/opt/local/apache2/bin/apxs"
passenger-install-apache2-module make a wrong guess about my apache path.
I have 2 apache servers in 2 separate directories. it picks up one
with APR 0.9 but should another with APR 1.x
and i should load the module into another one two. this is a total mess.
from passenger.
From dmitry.sychov on June 08, 2009 06:04:40
ok the workaround is to update the PATH env var, just before running the script:
PATH=/your/path/to/apache/bin:$PATH && export PATH
the installer script will correctly bind with all headers then.
hope it will help someone..
gee!
from passenger.
From honglilai on August 26, 2009 05:42:20
Labels: Milestone-2.2.6
from passenger.
From honglilai on November 17, 2009 11:14:34
Fixed in commit 50750b1.
from passenger.
From honglilai on November 17, 2009 11:14:54
Status: Fixed
from passenger.
Related Issues (20)
- HTTP3/QUIC breaks passenger Python apps ( Nginx + HTTP3 + Passenger ) HOT 2
- Cannot build passenger nginx dynamic module HOT 1
- Out of memory leads to passenger shutdown and ensuing 502 error on nginx HOT 3
- Out of memory leads to passenger shutdown and ensuing 502 error on nginx HOT 1
- Cannot upgrade to 1.24.0-1: unmet dependencies HOT 2
- Cannot find nginx module on Amazon Linux 2023 HOT 1
- Cannot install passenger-6.0.20-1.el9.x86_64.rpm on CentOS 9 Stream with Ruby 3.3 HOT 2
- Requests intermittently result in 500, directory in /tmp not found HOT 2
- Better cooperation with Kubernetes zero-downtime restarts
- Error with Rack prevents editing rails production credentials
- params are empty upon proper form submission HOT 1
- Packaging of unmaintained dependency: http-parser HOT 2
- The passenger spawns more processes than are allocated to it
- SecurityUpdateCheck fails when using builtin engine HOT 1
- Lacking rubyext-ruby-3.2.2-x86_64-linux.tar.gz from Release 6.0.20. HOT 1
- no Phusion Passenger(R) log file configured, discarding log output HOT 5
- Unable to locate package libnginx-mod-http-passenger | bullseye HOT 1
- Unable the fetch the repo for mod_passenger HOT 12
- passenger v6.0.21, ruby 3.3.1 with apache crashing. HOT 11
- passenger 6.0.21 will not install on AlmaLinux 9 / RHEL 9 HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from passenger.