Raspbian: PageSpeed (nginx) compliation error

隐身守侯 提交于 2019-12-13 06:57:16

问题


After executing the following commands:

mkdir -p ~/bin
cd ~/bin
svn co http://src.chromium.org/svn/trunk/tools/depot_tools
export PATH=$PATH:~/bin/depot_tools
mkdir ~/mod_pagespeed
cd ~/mod_pagespeed
gclient config http://modpagespeed.googlecode.com/svn/tags/1.9.32.1/src/
gclient sync --force --jobs=1 # add --revision=xxxx for a specific svn revision
cd src/
make AR.host="$PWD/build/wrappers/ar.sh" \
   AR.target="$PWD/build/wrappers/ar.sh" \
   BUILDTYPE=Release \
   mod_pagespeed_test pagespeed_automatic_test

From:
https://github.com/pagespeed/ngx_pagespeed/wiki/Building-PSOL-From-Source

In order to make PageSpeed from Google work on the Raspberry, an ARM device, as stated here:
https://github.com/pagespeed/ngx_pagespeed/issues/398

I ended up with the following error, after flawlessly running the commands before 'make'. There were no errors while executing 'make' until this:

CXX(host) out/Release/obj.host/protoc/third_party/protobuf/src/google/protobuf/compiler/main.o
LINK(host) out/Release/protoc
RULE _home_something_mod_pagespeed_src_net_instaweb_instaweb_gyp_instaweb_image_types_pb_target_genproto_0 out/Release/obj/gen/protoc_out/instaweb/net/instaweb/rewriter/image_types.pb.h
CXX(target) out/Release/obj.target/instaweb_image_types_pb/gen/protoc_out/instaweb/net/instaweb/rewriter/image_types.pb.o
In file included from out/Release/obj/gen/protoc_out/instaweb/net/instaweb/rewriter/image_types.pb.cc:5:0:
out/Release/obj/gen/protoc_out/instaweb/net/instaweb/rewriter/image_types.pb.h:7:18: fatal error: string: No such file or directory
#include <string>
              ^
compilation terminated.
net/instaweb/instaweb_image_types_pb.target.mk:355: recipe for target 'out/Release/obj.target/instaweb_image_types_pb/gen/protoc_out/instaweb/net/instaweb/rewriter/image_types.pb.o' failed
make: *** [out/Release/obj.target/instaweb_image_types_pb/gen/protoc_out/instaweb/net/instaweb/rewriter/image_types.pb.o] Error 1

I have ran the commands above several times, and I only got this far. And indeed, I can only find the following files:

    image_types.proto
    image_types.pb.h
    image_types.pb.cc

In the following directory, as seen in the error:

/home/something/mod_pagespeed/src/out/Release/obj/gen/protoc_out/instaweb/net/instaweb/rewriter

How can I possibly retrieve the correct file necessary?


回答1:


To successfully pass the HTTPS fetching tests, you may need to first set environment variables to find the certificate files. On Ubuntu, the test binaries should have the correct paths by default. On CentOS, these settings should work:

export SSL_CERT_DIR=/etc/pki/tls/certs export SSL_CERT_FILE=/etc/pki/tls/cert.pem



来源:https://stackoverflow.com/questions/26496660/raspbian-pagespeed-nginx-compliation-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!