Update Google PageSpeed mod_pagespeed

JelleG

Verified User
Joined
Jun 3, 2015
Messages
57
Hi,

I want to update the mod_pagespeed module to the latest version.
When I try to update it with the following command, recommend by Google, it fails.

How can I update the mod_pagespeed to the latest version?

Code:
sudo yum update mod-pagespeed-stable

I get the following error:

Code:
--> Processing Dependency: httpd >= 2.2 for package: mod-pagespeed-stable-1.11.33.2-0.x86_64
--> Finished Dependency Resolution
Error: Package: mod-pagespeed-stable-1.11.33.2-0.x86_64 (mod-pagespeed)
           Requires: httpd >= 2.2
 You could try using --skip-broken to work around the problem
** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows:
mod-pagespeed-stable-1.11.33.1-0.x86_64 has missing requires of httpd >= ('0', '2.2', None)
 
Hello,

- Build mod_pagespeed From Source | PageSpeed Module | Google Developers
https://developers.google.com/speed/pagespeed/module/build_mod_pagespeed_from_source#install

Thanks! I already installed the Google PageSpeed Module using the following tutorial: http://www.haloseeker.com/install-google-mod_pagespeed-on-centos-with-directadmin/

But what is in that case the best way to update the module? Just follow the steps again, to install the latest version? Or will that be a terrible way, because the old module will not be removed?
 
yes, follow the steps again

Great, thanks a lot!
Just to know, does that also remove the old version of the extention? And will that restore all changes I made in the config file to default?
 
When saying about a need to follow the steps again in order to upgrade module, I was considering only steps which you need to go through following guides from my post #4, i.e. you need to rebuild module again from a recent version of sources files. I did not read the 3rd party guide which you are referring to and won't give any comments on it. If you have any questions on the exactly guide from your post you'd better refer them to the author of the guide.

p.s. rebuilding module should not override any configs.
 
When saying about a need to follow the steps again in order to upgrade module, I was considering only steps which you need to go through following guides from my post #4, i.e. you need to rebuild module again from a recent version of sources files. I did not read the 3rd party guide which you are referring to and won't give any comments on it. If you have any questions on the exactly guide from your post you'd better refer them to the author of the guide.

p.s. rebuilding module should not override any configs.

Sadly I can not just install the new version, by following the steps again. Then I get the following error. How can I solve this?

rpm -i --nodeps mod-pagespeed-stable_current_x86_64.rpm
file /usr/bin/pagespeed_js_minify from install of mod-pagespeed-stable-1.11.33.2-0.x86_64 conflicts with file from package mod-pagespeed-stable-1.11.33.1-0.x86_64
file /usr/lib64/httpd/modules/mod_pagespeed.so from install of mod-pagespeed-stable-1.11.33.2-0.x86_64 conflicts with file from package mod-pagespeed-stable-1.11.33.1-0.x86_64
file /usr/lib64/httpd/modules/mod_pagespeed_ap24.so from install of mod-pagespeed-stable-1.11.33.2-0.x86_64 conflicts with file from package mod-pagespeed-stable-1.11.33.1-0.x86_64
 
When saying about a need to follow the steps again in order to upgrade module, I was considering only steps which you need to go through following guides from my post #4, i.e. you need to rebuild module again from a recent version of sources files. I did not read the 3rd party guide which you are referring to and won't give any comments on it. If you have any questions on the exactly guide from your post you'd better refer them to the author of the guide.

p.s. rebuilding module should not override any configs.

Do you know how to solve the issue with the conflicts problem?
 
You have to intall it using the rpm file that you can get from the official mod_pagespeed site and use: rpm -i --nodeps mod-pagespeed.rpm

If you have a previous version installed, you have to remove the previous one first.

Regards
 
Last edited:
Code:
yum replace pkg-old --replace-with=pkg-new

or follow Andrea's suggestion

Thanks for your reply.

I tried the following:

Code:
wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_x86_64.rpm

With the following result:

Code:
--2016-08-08 13:23:38--  https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_x86_64.rpm
Resolving dl-ssl.google.com (dl-ssl.google.com)... 2a00:1450:4013:c01::be, 173.194.65.190, 173.194.65.91, ...
Connecting to dl-ssl.google.com (dl-ssl.google.com)|2a00:1450:4013:c01::be|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 6606557 (6.3M) [application/x-redhat-package-manager]
Saving to: ‘mod-pagespeed-stable_current_x86_64.rpm.4’

100%[======================================>] 6,606,557   2.03MB/s   in 3.1s   

2016-08-08 13:23:41 (2.03 MB/s) - ‘mod-pagespeed-stable_current_x86_64.rpm.4’ saved [6606557/6606557]

Than:

Code:
yum replace pkg-old --replace-with=pkg-new

But then I receive the following error:

Code:
Loaded plugins: fastestmirror, langpacks
Usage: yum [options] COMMAND

List of Commands:

check          Check for problems in the rpmdb
check-update   Check for available package updates
clean          Remove cached data
deplist        List a package's dependencies
distribution-synchronization Synchronize installed packages to the latest available versions
downgrade      downgrade a package
erase          Remove a package or packages from your system
fs             Creates filesystem snapshots, or lists/deletes current snapshots.
fssnapshot     Creates filesystem snapshots, or lists/deletes current snapshots.
groups         Display, or use, the groups information
help           Display a helpful usage message
history        Display, or use, the transaction history
info           Display details about a package or group of packages
install        Install a package or packages on your system
langavailable  Check available languages
langinfo       List languages information
langinstall    Install appropriate language packs for a language
langlist       List installed languages
langremove     Remove installed language packs for a language
list           List a package or groups of packages
load-transaction load a saved transaction from filename
makecache      Generate the metadata cache
provides       Find what package provides the given value
reinstall      reinstall a package
repo-pkgs      Treat a repo. as a group of packages, so we can install/remove all of them
repolist       Display the configured software repositories
search         Search package details for the given string
shell          Run an interactive yum shell
swap           Simple way to swap packages, instead of using shell
update         Update a package or packages on your system
update-minimal Works like upgrade, but goes to the 'newest' package match which fixes a problem that affects your system
updateinfo     Acts on repository update information
upgrade        Update packages taking obsoletes into account
version        Display a version for the machine and/or available repos.


Command line error: no such option: --replace-with

How can I solve that?
 
Last edited:
You have to intall it using the rpm file that you can get from the official mod_pagespeed site and use: rpm -i --nodeps mod-pagespeed.rpm

If you have a previous version installed, you have to remove the previous one first.

Regards

Thanks, the only problem for me is, how can I remove the previous version? And if possible, I only want to remove the previous version, without losing my customizations in the config file. So that I only receive the updated files.
 
Hi, i guess you did create custom virtual_host(s) files in DA, those will not get touched by remove mod_pagespeed.

You can get the package name using rpm -qa mod_pagespeed*
Once you have the package name just use (on CentOS) yum remove PACKAGE
Than just install the new one and restart the webserver

Or use Alex suggestion:
yum replace OLD-PACKAGE-NAME --replace-with=NEW-PACKAGE-NAME

Regards
 
Hi, i guess you did create custom virtual_host(s) files in DA, those will not get touched by remove mod_pagespeed.

You can get the package name using rpm -qa mod_pagespeed*
Once you have the package name just use (on CentOS) yum remove PACKAGE
Than just install the new one and restart the webserver

Or use Alex suggestion:
yum replace OLD-PACKAGE-NAME --replace-with=NEW-PACKAGE-NAME

Regards

Hi,

Thanks for your reply

But when I use yum remove mod-pagespeed-stable.x86_64, that will also remove my config file of PageSpeed, right?
 
It shouldn,t the system should create a new file adding .rpmnew at the end, in any case, all those worries goes away if you just make a backup of those files ;)

Regards
 
as an fyi if this issue updating crops up again may need to rum
yum remove mod-pagespeed-stable.x86_64
to cleanup and links.
then updating/reinstaling new version should work
 
Back
Top