Problem installing mod page speed by google

ok I want to trwo the computer by the window.

I am trying to imstall google page speed module 2 weeks and I am not able too

I have donloaded the rpm to my server and then did this:

sudo rpm -U mod-pagespeed-stable_current_x86_64.rpm

I get this error and Am not able to complete the imnstalation.

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-

ok first i thoung t it was a apache version problem so i changed from 2.4.x to 2.2.x then tryed again… the same message.

then i started looking for solutions and I found this by mistake: when I look for my server details I get this:

HTTP/1.1 200 OK
Date: Thu, 10 Mar 2016 00:24:01 GMT
Server: Apache/2.2.31 (Unix) mod_ssl/2.2.31 OpenSSL/1.0.1e-fips mod_bwlimited/1.4
Last-Modified: Wed, 02 Mar 2016 23:29:50 GMT
ETag: “2bc4396-6f-52fdgdfgfde”
Accept-Ranges: bytes
Content-Length: 111
Content-Type: text/html

but at other sites I get (Cento) not (Unix) Could be this the problem? at my godaddy vps account it have this:OS
CentOS 6 + cPanel

so do I have centos Running? Is this why I am not being able to install the module?

What do I need to do to be able to perform this instalation? Thank you very much!!!


The issue is because of lack of dependency, so install dependency and later try to install the package for knowing about required dependencies follow these…

# repoquery --requires --resolve mod-pagespeed-stable-


#yum deplist mod-pagespeed-stable-

and also while installing package use yum because it will take care about dependencies.

Thank you very much!!!
run # repoquery --requires --resolve mod-pagespeed-stable- but nothign happend so tried with
#yum deplist mod-pagespeed-stable-
and this is what i get:

root@server [~]# yum deplist mod-pagespeed-stable-
Loaded plugins: fastestmirror, tsflags, universal-hooks
Finding dependencies:
Loading mirror speeds from cached hostfile

Do I need to do something with this? or I just need to input something like:
yum mod-pagespeed-stable_current_x86_64.rpm

Thank you very very much for your help!

Error message shows that httpd latest version required , either you update httpd first then try to install this rpm else you can try to install yum localinstall

Post the screen shots where you are facing the error and also the out put of below commands

#apachectl -v

#rpm -Uvh  mod-xxxxxxxxxxxxxx.rpm 

and this is the result of the commands: Thank yo very very much for helping me!

root@server [~]# apachectl -v
-bash: apachectl: command not found
root@server [~]# rpm - Uvh mod-pagespeed-stable_current_x86_64.rpm
RPM version 4.8.0
Copyright © 1998-2002 - Red Hat, Inc.
This program may be freely redistributed under the terms of the GNU GPL

Usage: rpm [-aKfgpWHqVcdilsKiv?] [-a|–all] [-f|–file] [-g|–group]
[-p|–package] [-W|–ftswalk] [–pkgid] [–hdrid] [–fileid]
[–specfile] [–triggeredby] [–whatrequires] [–whatprovides]
[–nomanifest] [-c|–configfiles] [-d|–docfiles] [–dump] [-l|–list]
[–queryformat=QUERYFORMAT] [-s|–state] [–nofiledigest] [–nomd5]
[–nofiles] [–nodeps] [–noscript] [–comfollow] [–logical]
[–nochdir] [–nostat] [–physical] [–seedot] [–xdev]
[–whiteout] [–addsign] [-K|–checksig] [–delsign] [–import]
[–resign] [–nodigest] [–nosignature] [–initdb] [–rebuilddb]
[–aid] [–allfiles] [–allmatches] [–badreloc]
[-e|–erase +] [–excludedocs] [–excludepath=]
[–fileconflicts] [–force] [-F|–freshen +] [-h|–hash]
[–ignorearch] [–ignoreos] [–ignoresize] [-i|–install] [–justdb]
[–nodeps] [–nofiledigest] [–nomd5] [–nocontexts] [–noorder]
[–nosuggest] [–noscripts] [–notriggers] [–oldpackage]
[–percent] [–prefix=] [–relocate==]
[–replacefiles] [–replacepkgs] [–test]
[-U|–upgrade +] [–quiet] [-D|–define ‘MACRO EXPR’]
[-E|–eval ‘EXPR’] [–macros=<FILE:…>] [–nodigest] [–nosignature]
[–rcfile=<FILE:…>] [-r|–root ROOT] [–querytags] [–showrc]
[–quiet] [-v|–verbose] [–version] [-?|–help] [–usage]
[–scripts] [–setperms] [–setugids] [–conflicts] [–obsoletes]
[–provides] [–requires] [–info] [–changelog] [–xml]
[–triggers] [–last] [–dupes] [–filesbypkg] [–fileclass]
[–filecolor] [–fscontext] [–fileprovide] [–filerequire]
root@server [~]#

Have you installed apache in that server…?

  1. Install httpd or apache
#yum info httpd

#yum install httpd
  1. look at the version of apache service
#apachectl -v                         #### no space between **-** and **v**#######


#httpd -v                             #### no space between **-** and **v**#######

3)Now try to install the package

# rpm -Uvh mod-xxxxxxxxxxx.rpm        #### no space between **-** and **Uvh**####### 

tried the following commands:

root@server [~]# yum info httpd
Loaded plugins: fastestmirror, tsflags, universal-hooks
Loading mirror speeds from cached hostfile

  • base:
  • extras:
  • updates:
    base | 3.7 kB 00:00
    extras | 3.4 kB 00:00
    newrelic | 951 B 00:00
    updates | 3.4 kB 00:00
    Error: No matching Packages to list
    root@server [~]# apachectl -v
    -bash: apachectl: command not found
    root@server [~]# httpd -v
    Server version: Apache/2.2.31 (Unix)
    Server built: Mar 2 2016 18:29:39
    Cpanel::Easy::Apache v3.32.10 rev9999
    root@server [~]#

as far as I can see there is apache 2.2.31(unix) intslled but my godaddy account says I have CentOS6 and I saw the info shoulc come like this:Server version: Apache/2.2.31 (Cento) is this ok?

Do I need to perform the
#yum install httpd
command anyway?

you can skip dependency by using rpm -Uvh --nodeps

It looks like its not a dependencies problem, or maybe but I am not sure, found this guide and followed step one
cpanelkb. net /how-to-install-mod-pagespeed-on-cpanel-server/

everything went more or less ok but at the end I get this error:
[Fri Mar 11 23:55:25.479635 2016] [pagespeed:warn] [pid 5774] ModPagespeedGeneratedFilePrefix is deprecated. Please remove it from your configuration.
root@server [/usr/local/src/mod_pagespeed]#

ok so I took the like out from the file and stop getting thias alert.

now Iam tring with httpg -M and i get a list witjh pagespeed_module (shared)

but when i try curl -I I just get this info:

HTTP/1.1 302 Found
Date: Sat, 12 Mar 2016 06:19:06 GMT
Server: Apache/2.4.18 (Unix) OpenSSL/1.0.1e-fips mod_bwlimited/1.4
Location: myserver/
Content-Type: text/html; charset=iso-8859-1

according to the article mod page speed shopuld appear here.

I made a test to see if any of my resorces are being compressed or unified but nothing, looks like its not working.

I made a change to the article because I am on apache 2.4 so google developers recommends this:

PageSpeed Configuration

Enabling the Module

PageSpeed contains an “output filter” plus several content handlers.

Note: The location of the configuration file is dependent both on the Linux distribution on which PageSpeed is installed and on whether you’re using PageSpeed with Apache or Nginx.

In Apache the configuration file is pagespeed.conf and will be in either:

Debian/Ubuntu: /etc/apache2/mods-available/
CentOS/Fedora: /etc/httpd/conf.d/
In Nginx the configuration typically should go in your nginx.conf which for source installs defaults to being in:
In Apache PageSpeed is enabled automatically when you install the module while in Nginx you need to add several lines to your nginx.conf. In every server block where PageSpeed is enabled add:

pagespeed on;

Needs to exist and be writable by nginx. Use tmpfs for best performance.

pagespeed FileCachePath /var/ngx_pagespeed_cache;

Ensure requests for pagespeed optimized resources go to the pagespeed handler

and no extraneous headers get set.

location ~ “.pagespeed.([a-z].)?[a-z]{2}.[^.]{10}.[^.]+” {
add_header “” “”;
location ~ “^/pagespeed_static/” { }
location ~ “^/ngx_pagespeed_beacon$” { }
See the Admin Page documentation for instructions on how to configure handlers to provide visibility and control into PageSpeed’s operation.
Apache-Specific Configuration

Setting up the Output Filter

The output filter is used to parse, optimize, and re-serialize HTML content that is generated elsewhere in the Apache server.

Direct Apache to send all HTML output to the mod_pagespeed output handler.

AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER text/html
Note: mod_pagespeed automatically enables mod_deflate for compression.

Turning the module on and off

To turn mod_pagespeed ON, insert as the top line of pagespeed.conf:

ModPagespeed on
There are two ways to disable mod_pagespeed. To disable HTML rewriting but continue to serve .pagespeed. resources and parse query options (for instance for ?ModPagespeed=on) put this line in your configuration:

ModPagespeed off
To completely disable mod_pagespeed (.pagespeed. resources will result in 404s) use the following line:

Note: New feature as of

ModPagespeed unplugged
The on and off values can be used in .htaccess files, scopes, query parameters, and headers. The unplugged value can only be used in the top-level Apache configuration and in virtual hosts. Note that ModPagespeed on in a virtual host can override a top-level unplugged directive.

Support for Apache 2.4.x

mod_pagespeed is compatible with Apache 2.2.x and Apache 2.4.x series, versions 2.4.2 and newer. Please note that Apache 2.4.1 has a bug that may cause stability problems in combination with mod_pagespeed, so use with 2.4.1 is strongly discouraged.

As Apache 2.4 is not API compatible with 2.2, support for it is provided via a separate module binary, instead of the usual The configuration provided in our binary packages will normally load the right module version automatically. However, if you upgrade the CentOS packages from an earlier version, the needed configuration change may not get applied on top of a user-customized pagespeed.conf, so you may need to adjust the LoadModule line manually.

Source builds with mod_pagespeed-provided Apache headers will build both 2.2.x and 2.4.x binaries as well, and you will need to add a LoadModule line matching the server version in use, or use a pattern similar to:

<IfModule !mod_version.c>
LoadModule version_module /usr/lib/apache2/modules/

<IfVersion < 2.4>
LoadModule pagespeed_module /usr/lib/apache2/modules/

= 2.4.2>
LoadModule pagespeed_module /usr/lib/apache2/modules/

soo changed the code and the file name to

still NOTHING!

Please help me :frowning:

I think it is all about dependency issue once plz share the screen shot of below command

#rpm -qa | grep -i httpd