2

I juste installed apxs bin with the httpd24-httpd-devel-2.4.6-16.el6.x86_64 package.

I need it to compile PHP with Apache module.

When I launch the command apxs --help I get the following error:

cannot open /httpd/build/config_vars.mk: No such file or directory at /opt/rh/httpd24/root/usr/bin/apxs line 214

I locate this file into /opt/rh/httpd24/root/usr/lib64/httpd/build/, should I add this folder to my PATH or is there a way to tell Apache to look at this directory?

1
  • This may be a problem with the way that it was packaged. You should contact your Red Hat rep to open a support case. Nov 25, 2014 at 13:21

2 Answers 2

3

This is the problem with SCL package httpd24-httpd-devel. There was already bug for standard CentOS/RedHat rpm which was fixed.

Since apxs is a perl script if you take a look inside it, this is the responsible code:

my $libdir = `pkg-config --variable=libdir apr-1`;
chomp $libdir;

my $installbuilddir = $libdir . "/httpd/build";

What you also can do is change the $installbuilddir variable to:

my $installbuilddir = '/opt/rh/httpd24/root/usr/lib64' . "/httpd/build";

Just make sure you modify the httpd24 apxs, which is available at /opt/rh/httpd24/root/usr/bin/apxs, and not the orig one (/usr/sbin/apxs).

If you don't want to modify apxs, this quick fix would work also:

cd /
ln -s /opt/rh/httpd24/root/usr/lib64/httpd .
1
  • This is a bad idea. The issue is sudo make install is destroying the path, and the wrong pkg-config gets called. See my answer. Mar 6, 2015 at 21:18
0

Are you doing sudo make install from inside a scl enable httpd24 bash? This resets $PATH to the default. You need to instead do:

sudo scl enable httpd24 perl516 'make install'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.