installation error: EXCEPTION: No such file or directory - /usr/local/apache2/bin/apxs (Errno::ENOENT)

1,220 views
Skip to first unread message

cul8e...@gmail.com

unread,
Jul 10, 2014, 11:16:44 AM7/10/14
to phusion-...@googlegroups.com
Hi, all. 
I've got the error message after typing 'passenger-install-apache2-module'.
Before that, I did as below:

gem install passenger
export HTTPD=/usr/local/apache2/bin/httpd
export APXS2=/usr/local/apache2/bin/apxs
export APR_CONFIG=/usr/local/apr/bin/apr-1-config
export APU_CONFIG=/usr/local/apr/bin/apu-1-config
passenger-install-apache2-module
 
I had built manually apache2  to /usr/local/apache2,
that's why I exported some environment variables.

However, I got the message: "EXCEPTION: No such file or directory - /usr/local/apache2/bin/apxs (Errno::ENOENT)".
But I'm sure the file 'apxs' at /usr/local/apache2/bin.

[root@localhost src]# ls /usr/local/apache2/bin
ab         apxs      dbmmanage  envvars-std  htcacheclean  htdigest  httpd      logresolve
apachectl  checkgid  envvars    fcgistarter  htdbm         htpasswd  httxt2dbm  rotatelogs

I can't find what to do for solving this problem.
Please help.

OS: CentOS-6.5, using virtual box and vagrant.

The following is what I did and what is shown on the console.

##########################################################

[root@localhost ~]# export HTTPD=/usr/local/apache2/bin/httpd
[root@localhost ~]# export APXS2=/usr/local/apache2/bin/apxs
[root@localhost ~]# export APR_CONFIG=/usr/local/apr/bin/apr-1-config
[root@localhost ~]# export APU_CONFIG=/usr/local/apr/bin/apu-1-config
[root@localhost ~]# passenger-install-apache2-module
Welcome to the Phusion Passenger Apache 2 module installer, v4.0.45.

This installer will guide you through the entire installation process. It
shouldn't take more than 3 minutes in total.

Here's what you can expect from the installation process:

 1. The Apache 2 module will be installed for you.
 2. You'll learn how to configure Apache.
 3. You'll learn how to deploy a Ruby on Rails application.

Don't worry if anything goes wrong. This installer will advise you on how to
solve any problems.

Press Enter to continue, or Ctrl-C to abort.


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

Which languages are you interested in?

Use <space> to select.
If the menu doesn't display correctly, press '!'

 ? ?  Ruby
   ?  Python
   ?  Node.js
   ?  Meteor

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

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 Curl development headers with SSL support...
      Found: yes
      curl-config location: /usr/bin/curl-config
      Header location: /usr/include/curl/curl.h
      Version: libcurl 7.19.7
      Usable: yes
      Supports SSL: yes
 * Checking for OpenSSL development headers...
      Found: yes
      Location: /usr/include/openssl/ssl.h
 * Checking for Zlib development headers...
      Found: yes
      Location: /usr/include/zlib.h
 * Checking for Apache 2...
      Found: yes
      Location of httpd: /usr/local/apache2/bin/httpd
      Apache version: 2.4.9
 * Checking for Apache 2 development headers...
      Found: yes
      Location of apxs2: /usr/local/apache2/bin/apxs
 * Checking for Rake (associated with /usr/local/bin/ruby)...
      Found: yes
      Location: /usr/local/bin/ruby /usr/local/bin/rake
 * Checking for OpenSSL support for Ruby...
      Found: yes
 * Checking for RubyGems...
      Found: yes
 * Checking for Ruby development headers...
      Found: yes
      Location: /usr/local/include/ruby-2.1.0/ruby.h
 * Checking for rack...
      Found: yes
 * Checking for Apache Portable Runtime (APR) development headers...
      Found: yes
      Location: /usr/local/apr/bin/apr-1-config
      Version: 1.5.1
 * Checking for Apache Portable Runtime Utility (APU) development headers...
      Found: yes
      Location: /usr/local/apr/bin/apu-1-config
      Version: 1.5.3

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

Sanity checking Apache installation...
--------------------------------------------
*** EXCEPTION: No such file or directory - /usr/local/apache2/bin/apxs (Errno::ENOENT)
    /usr/local/lib/ruby/gems/2.1.0/gems/passenger-4.0.45/lib/phusion_passenger/platform_info/apache.rb:508:in ``'
    /usr/local/lib/ruby/gems/2.1.0/gems/passenger-4.0.45/lib/phusion_passenger/platform_info/apache.rb:508:in `apache2_sbindir'
    /usr/local/lib/ruby/gems/2.1.0/gems/passenger-4.0.45/lib/phusion_passenger/platform_info.rb:115:in `apache2_sbindir'
    /usr/local/lib/ruby/gems/2.1.0/gems/passenger-4.0.45/lib/phusion_passenger/platform_info/apache.rb:462:in `find_apache2_executable'
    /usr/local/lib/ruby/gems/2.1.0/gems/passenger-4.0.45/lib/phusion_passenger/platform_info/apache.rb:64:in `apache2ctl'
    /usr/local/lib/ruby/gems/2.1.0/gems/passenger-4.0.45/lib/phusion_passenger/platform_info.rb:115:in `apache2ctl'
    /usr/local/lib/ruby/gems/2.1.0/gems/passenger-4.0.45/lib/phusion_passenger/platform_info/apache_detector.rb:133:in `block in detect_one'
    /usr/local/lib/ruby/gems/2.1.0/gems/passenger-4.0.45/lib/phusion_passenger/platform_info/apache_detector.rb:226:in `add_result'
    /usr/local/lib/ruby/gems/2.1.0/gems/passenger-4.0.45/lib/phusion_passenger/platform_info/apache_detector.rb:118:in `detect_one'
    /usr/local/lib/ruby/gems/2.1.0/gems/passenger-4.0.45/lib/phusion_passenger/platform_info/apache_detector.rb:112:in `block in detect_all'
    /usr/local/lib/ruby/gems/2.1.0/gems/passenger-4.0.45/lib/phusion_passenger/platform_info/apache_detector.rb:111:in `each'
    /usr/local/lib/ruby/gems/2.1.0/gems/passenger-4.0.45/lib/phusion_passenger/platform_info/apache_detector.rb:111:in `detect_all'
    /usr/local/lib/ruby/gems/2.1.0/gems/passenger-4.0.45/bin/passenger-install-apache2-module:195:in `check_whether_there_are_multiple_apache_installs'
    /usr/local/lib/ruby/gems/2.1.0/gems/passenger-4.0.45/bin/passenger-install-apache2-module:127:in `run_steps'
    /usr/local/lib/ruby/gems/2.1.0/gems/passenger-4.0.45/lib/phusion_passenger/abstract_installer.rb:71:in `run'
    /usr/local/lib/ruby/gems/2.1.0/gems/passenger-4.0.45/bin/passenger-install-apache2-module:863:in `<top (required)>'
    /usr/local/bin/passenger-install-apache2-module:23:in `load'
    /usr/local/bin/passenger-install-apache2-module:23:in `<main>'

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

Oops, something went wrong :-(

We're sorry, but it looks like this installer ran into an unexpected problem.
Please visit the following website for support. We'll do our best to help you.


When submitting a support inquiry, please copy and paste the entire installer
output.

[root@localhost ~]# ll /usr/local/apache2/bin/apxs
-rwxr-xr-x. 1 root root 23540 Jul  9 06:41 /usr/local/apache2/bin/apxs
[root@localhost ~]# ll /usr/local/apache2/bin/
total 2372
-rwxr-xr-x. 1 root root  128636 Jul  9 06:45 ab
-rwxr-xr-x. 1 root root    3437 Jul  9 06:41 apachectl
-rwxr-xr-x. 1 root root   23540 Jul  9 06:41 apxs
-rwxr-xr-x. 1 root root   12221 Jul  9 06:45 checkgid
-rwxr-xr-x. 1 root root    8950 Jul  9 06:41 dbmmanage
-rw-r--r--. 1 root root    1073 Jul  9 06:41 envvars
-rw-r--r--. 1 root root    1073 Jul  9 06:41 envvars-std
-rwxr-xr-x. 1 root root   20128 Jul  9 06:45 fcgistarter
-rwxr-xr-x. 1 root root   66554 Jul  9 06:45 htcacheclean
-rwxr-xr-x. 1 root root   40602 Jul  9 06:45 htdbm
-rwxr-xr-x. 1 root root   22175 Jul  9 06:45 htdigest
-rwxr-xr-x. 1 root root   41274 Jul  9 06:45 htpasswd
-rwxr-xr-x. 1 root root 1950194 Jul  9 06:45 httpd
-rwxr-xr-x. 1 root root   19400 Jul  9 06:45 httxt2dbm
-rwxr-xr-x. 1 root root   21852 Jul  9 06:45 logresolve
-rwxr-xr-x. 1 root root   34390 Jul  9 06:45 rotatelogs

cul8e...@gmail.com

unread,
Jul 11, 2014, 8:15:18 AM7/11/14
to phusion-...@googlegroups.com
I've understood the cause just right now.

LD_LIBRARY_PATH  must be exported too.

After all, I did success building apache and passenger.

yum -y install pcre-devel.x86_64
cd
/usr/local/src
wget http
://ftp.riken.jp/net/apache//httpd/httpd-2.4.9.tar.gz
wget http
://ftp.kddilabs.jp/infosystems/apache//apr/apr-1.5.1.tar.gz
wget http
://ftp.kddilabs.jp/infosystems/apache//apr/apr-util-1.5.3.tar.gz
tar xvfz httpd
-2.4.9.tar.gz
tar xvfz apr
-1.5.1.tar.gz
tar xvfz apr
-util-1.5.3.tar.gz
mv apr
-1.5.1      /usr/local/src/httpd-2.4.9/srclib/apr
mv apr
-util-1.5.3 /usr/local/src/httpd-2.4.9/srclib/apr-util
cd
/usr/local/src/httpd-2.4.9
./configure --with-included-apr --enable-mods-shared=all --enable-mpms-shared=all --enable-modules=all --enable-ssl  --with-pcre=/usr/bin/pcre-config
make
make install
yum
-y install curl-devel
gem install passenger
export HTTPD=/usr/local/apache2/bin/httpd
export APXS2=/usr/local/apache2/bin/apxs
export APR_CONFIG=/usr/local/apache2/bin/apr-1-config
export APU_CONFIG=/usr/local/apache2/bin/apu-1-config
export LD_LIBRARY_PATH=/usr/local/apache2/lib:$LD_LIBRARY_PATH
passenger
-install-apache2-module




Tinco Andringa

unread,
Jul 11, 2014, 8:21:14 AM7/11/14
to phusion-...@googlegroups.com
Thank you for contributing back the solution :)
> --
> You received this message because you are subscribed to the Google Groups
> "Phusion Passenger Discussions" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to phusion-passen...@googlegroups.com.
> To post to this group, send email to phusion-...@googlegroups.com.
> Visit this group at http://groups.google.com/group/phusion-passenger.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/phusion-passenger/a35a313a-3052-4dbf-9ff6-9a558dfad7f1%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



--
Phusion | Web application deployment, scaling and monitoring solutions

Web: http://www.phusion.nl/
E-mail: in...@phusion.nl
Chamber of commerce no: 08173483 (The Netherlands)
Reply all
Reply to author
Forward
0 new messages