Nick Rice
Nick Rice

Reputation: 1223

sudo dpkg -i mod-pagespeed-*.deb giving "not a debian format archive" error

The following apparently trivial two initial steps to install mod-pagespeed resulted in the error,

'mod-pagespeed-stable_current_amd64.deb' is not a debian format archive

even though the first (wget) step appeared to work properly.

wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_amd64.deb
sudo dpkg -i mod-pagespeed-*.deb

What might be going wrong and how to fix that?

Upvotes: 1

Views: 2567

Answers (1)

Nick Rice
Nick Rice

Reputation: 1223

In my case the .deb file was much smaller than expected and its content indicated that "this product is not available in your country," even though the server was meant to be in the UK, and https://www.countryipblocks.net/ agreed that it was in the UK. (http://whatismyipaddress.com/ip-lookup said it was in the US.)

The solution was simply to go to the Google download page for the module, https://developers.google.com/speed/pagespeed/module/download, do a local download (eg right click the appropriate link and do "Save link as ..." in Firefox), and then upload that to the server.

It then built fine.

(I found this solution in a comment about a different problem at http://www.turnkeylinux.org/forum/support/20120514/how-do-i-install-modpagespeed, which speculated that "server's IP was somehow mistraced by Google to some weird country or something" - could this be the underlying cause?)

Edit: Possible gotcha: Later problems with apt-get update with a GPG error (fatal) with the mod-pagespeed installation being the very smoky gun. It was a mess to sort out.

Upvotes: 1

Related Questions