Installing Google PageSpeed Fails, EA4

tylerjr92

Member
May 24, 2014
9
1
3
cPanel Access Level
Reseller Owner
Hello!

I am having some trouble getting google page speed installed. I have no idea why but it seems some setting somewhere is standing in my way as I have never had an issue installing this and on my local clone of my server, it works fine.

So heres the error I get:

Code:
$ rpm -U mod-pagespeed-*.rpm
warning: mod-pagespeed-stable_current_x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 7fac5991: NOKEY
error: Failed dependencies:
httpd >= 2.2 is needed by mod-pagespeed-stable-1.11.33.2-0.x86_64
This command is taken directly from Installing From Packages

I have changed httpd to show Server Tokens to Full as I thought this was the issue.

Ran this command to verify:
Code:
$ curl -I localhost
HTTP/1.1 200 OK
Date: Sun, 22 May 2016 06:07:17 GMT
Server: Apache/2.4.20 (cPanel) OpenSSL/1.0.1e-fips mod_bwlimited/1.4
Last-Modified: Wed, 02 Sep 2015 12:21:20 GMT
Accept-Ranges: bytes
Content-Length: 111
Content-Type: text/html
As you can see running 2.4.2 which is fully supported but for some odd reason it says I need version 2.2 or higher... Any input is welcome.
 

sarath8372

Active Member
Jan 6, 2015
35
7
8
Kochi, India
cPanel Access Level
Root Administrator
Hello,

The best and recommended option would be to install mod_pagespeed via EasyApache.

Try this : github.com/pagespeed/cpanel
 
Last edited by a moderator:

tylerjr92

Member
May 24, 2014
9
1
3
cPanel Access Level
Reseller Owner
Hello,

The best and recommended option would be to install mod_pagespeed via EasyApache.

Try this : github.com/pagespeed/cpanel

Hello,

I was following the instructions on that page and they were failing as well. I did find an issue logged in this Git that provided these instructions that are successful.

Code:
For EA4, please follow the steps below to upgrade the same.

1) Create a file called '/etc/rpm/macros.apache2' and paste the below contents into that.

%_httpd_mmn 20120211x8664
%_httpd_apxs /usr/bin/apxs
%_httpd_dir /etc/apache2
%_httpd_bindir %{_httpd_dir}/bin
%_httpd_modconfdir %{_httpd_dir}/conf.modules.d
%_httpd_confdir %{_httpd_dir}/conf.d
%_httpd_contentdir /usr/share/apache2
%_httpd_moddir /usr/lib64/apache2/modules

then,

$>  rm -rf /root/rpmbuild/RPMS/x86_64/
$> wget https://github.com/pagespeed/cpanel/raw/master/EA4/ea-apache24-mod_pagespeed-latest-stable.src.rpm
$> rpmbuild --rebuild ea-apache24-mod_pagespeed-latest-stable.src.rpm
$> rpm -Uvh /root/rpmbuild/RPMS/x86_64/ea-apache24-mod_pagespeed*.rpm
$> /etc/init.d/httpd restart
Google Page Speed is now running, hope this helps someone else!
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello,

I'm happy to see you were able to address the issue. Thank you for updating us with the outcome.
 

pauloray

Well-Known Member
Jan 16, 2012
76
0
56
Philippines
cPanel Access Level
Root Administrator
I have used the RPM from this link - https://github.com/pagespeed/cpanel/tree/master/EA4/ea-apache24-mod_pagespeed-latest-stable.src.rpm

And executing the command:
Code:
rpmbuild --rebuild ea-apache24-mod_pagespeed-latest-stable.src.rpm
gives me this error
Code:
Installing ea-apache24-mod_pagespeed-latest-stable.src.rpm
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.mDEq8Q
+ umask 022
+ cd /root/rpmbuild/BUILD
+ wget -q -N -O mod-pagespeed-stable.rpm https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_x86_64.rpm
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.maMwgU
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cpio -idmv
+ rpm2cpio mod-pagespeed-stable.rpm
./etc/cron.daily/mod-pagespeed
./etc/httpd/conf.d/pagespeed.conf
./etc/httpd/conf.d/pagespeed_libraries.conf
./usr/bin/pagespeed_js_minify
./usr/lib64/httpd/modules/mod_pagespeed.so
./usr/lib64/httpd/modules/mod_pagespeed_ap24.so
./var/cache/mod_pagespeed
./var/log/pagespeed
37292 blocks
+ mv usr/lib64/httpd/modules/mod_pagespeed.so usr/lib64/httpd/modules/mod_pagespeed_ap24.so .
+ /usr/bin/strip -g mod_pagespeed.so
+ /usr/bin/strip -g mod_pagespeed_ap24.so
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.xptIo2
+ umask 022
+ cd /root/rpmbuild/BUILD
+ '[' /root/rpmbuild/BUILDROOT/ea-apache24-mod_pagespeed-latest-stable.x86_64 '!=' / ']'
+ rm -rf /root/rpmbuild/BUILDROOT/ea-apache24-mod_pagespeed-latest-stable.x86_64
++ dirname /root/rpmbuild/BUILDROOT/ea-apache24-mod_pagespeed-latest-stable.x86_64
+ mkdir -p /root/rpmbuild/BUILDROOT
+ mkdir /root/rpmbuild/BUILDROOT/ea-apache24-mod_pagespeed-latest-stable.x86_64
+ rm -rf /root/rpmbuild/BUILDROOT/ea-apache24-mod_pagespeed-latest-stable.x86_64
+ mkdir -p '/root/rpmbuild/BUILDROOT/ea-apache24-mod_pagespeed-latest-stable.x86_64%{_httpd_moddir}'
+ install -m755 mod_pagespeed.so '/root/rpmbuild/BUILDROOT/ea-apache24-mod_pagespeed-latest-stable.x86_64%{_httpd_moddir}/'
+ install -m755 mod_pagespeed_ap24.so '/root/rpmbuild/BUILDROOT/ea-apache24-mod_pagespeed-latest-stable.x86_64%{_httpd_moddir}/'
+ mkdir -p '/root/rpmbuild/BUILDROOT/ea-apache24-mod_pagespeed-latest-stable.x86_64%{_httpd_modconfdir}'
+ install -m 644 /root/rpmbuild/SOURCES/456_pagespeed.conf '/root/rpmbuild/BUILDROOT/ea-apache24-mod_pagespeed-latest-stable.x86_64%{_ht                                   tpd_modconfdir}/'
+ /usr/lib/rpm/check-buildroot
find: '/root/rpmbuild/BUILDROOT/ea-apache24-mod_pagespeed-latest-stable.x86_64': No such file or directory
+ /usr/lib/rpm/redhat/brp-compress
/usr/lib/rpm/redhat/brp-compress: line 8: cd: /root/rpmbuild/BUILDROOT/ea-apache24-mod_pagespeed-latest-stable.x86_64: No such file or d                                   irectory
+ /usr/lib/rpm/redhat/brp-strip /usr/bin/strip
find: '/root/rpmbuild/BUILDROOT/ea-apache24-mod_pagespeed-latest-stable.x86_64': No such file or directory
+ /usr/lib/rpm/redhat/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump
find: '/root/rpmbuild/BUILDROOT/ea-apache24-mod_pagespeed-latest-stable.x86_64': No such file or directory
+ /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip
find: '/root/rpmbuild/BUILDROOT/ea-apache24-mod_pagespeed-latest-stable.x86_64': No such file or directory
+ /usr/lib/rpm/brp-python-bytecompile /usr/bin/python 1
find: '/root/rpmbuild/BUILDROOT/ea-apache24-mod_pagespeed-latest-stable.x86_64': No such file or directory
find: '/root/rpmbuild/BUILDROOT/ea-apache24-mod_pagespeed-latest-stable.x86_64': No such file or directory
Can't list /root/rpmbuild/BUILDROOT/ea-apache24-mod_pagespeed-latest-stable.x86_64
+ /usr/lib/rpm/redhat/brp-python-hardlink
find: '/root/rpmbuild/BUILDROOT/ea-apache24-mod_pagespeed-latest-stable.x86_64': No such file or directory
+ /usr/lib/rpm/redhat/brp-java-repack-jars
find: '/root/rpmbuild/BUILDROOT/ea-apache24-mod_pagespeed-latest-stable.x86_64': No such file or directory
Processing files: ea-apache24-mod_pagespeed-latest-stable.x86_64
error: File must begin with "/": %{_httpd_moddir}/*.so
error: File must begin with "/": %{_httpd_modconfdir}/*.conf
How to fix this error?

Thanks.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463