在CentOS 5上使用本机Passenger模块安装Nginx时出错

时间:2017-01-17 12:07:44

标签: ruby-on-rails nginx passenger

我想部署rails应用程序并且我正在学习本教程:https://www.digitalocean.com/community/tutorials/how-to-deploy-rails-apps-using-passenger-with-nginx-on-centos-6-5

但是,当我运行passenger-install-nginx-module命令时,它无法编译。输出如下:

Compiling Passenger support files...
# env NOEXEC_DISABLE=1 /usr/local/bin/ruby /usr/local/bin/rake nginx:clean nginx RELEASE=yes
rm -rf buildout/cache
rm -rf buildout/common/libboost_oxt.a buildout/common/libboost_oxt
rm -f buildout/common/libpassenger_common/Logging.o buildout/common/libpassenger_common/Exceptions.o buildout/common/libpassenger_common/Utils/SystemTime.o buildout/common/libpassenger_common/Utils/StrIntUtils.o buildout/common/libpassenger_common/Utils/StrIntUtilsNoStrictAliasing.o buildout/common/libpassenger_common/Utils/IOUtils.o buildout/common/libpassenger_common/Utils.o
rm -f buildout/common/libpassenger_common/Crypto.o buildout/common/libpassenger_common/Utils/CachedFileStat.o buildout/common/libpassenger_common/Utils/LargeFiles.o buildout/common/libpassenger_common/WatchdogLauncher.o buildout/common/libpassenger_common/MemoryKit/mbuf.o buildout/common/libpassenger_common/MemoryKit/palloc.o buildout/common/libpassenger_common/ServerKit/http_parser.o buildout/common/libpassenger_common/ServerKit/Implementation.o buildout/common/libpassenger_common/DataStructures/LString.o buildout/common/libpassenger_common/Utils/Hasher.o buildout/common/libpassenger_common/AppTypes.o
rm -f buildout/common/libpassenger_common/jsoncpp.o
rm -f buildout/common/libpassenger_common/vendor-modified/modp_b64.o buildout/common/libpassenger_common/vendor-modified/modp_b64_strict_aliasing.o
rm -f buildout/common/libpassenger_common/UnionStationFilterSupport.o
rm -rf buildout/common/libpassenger_common
rm -rf buildout/support-binaries/
rm -rf buildout/nginx_dynamic/libboost_oxt.a buildout/nginx_dynamic/libboost_oxt
rm -f buildout/nginx_dynamic/module_libpassenger_common/Logging.o buildout/nginx_dynamic/module_libpassenger_common/Exceptions.o buildout/nginx_dynamic/module_libpassenger_common/Utils/SystemTime.o buildout/nginx_dynamic/module_libpassenger_common/Utils/StrIntUtils.o buildout/nginx_dynamic/module_libpassenger_common/Utils/StrIntUtilsNoStrictAliasing.o buildout/nginx_dynamic/module_libpassenger_common/Utils/IOUtils.o buildout/nginx_dynamic/module_libpassenger_common/Utils.o
rm -f buildout/nginx_dynamic/module_libpassenger_common/Crypto.o buildout/nginx_dynamic/module_libpassenger_common/Utils/CachedFileStat.o buildout/nginx_dynamic/module_libpassenger_common/Utils/LargeFiles.o buildout/nginx_dynamic/module_libpassenger_common/WatchdogLauncher.o buildout/nginx_dynamic/module_libpassenger_common/MemoryKit/mbuf.o buildout/nginx_dynamic/module_libpassenger_common/MemoryKit/palloc.o buildout/nginx_dynamic/module_libpassenger_common/ServerKit/http_parser.o buildout/nginx_dynamic/module_libpassenger_common/ServerKit/Implementation.o buildout/nginx_dynamic/module_libpassenger_common/DataStructures/LString.o buildout/nginx_dynamic/module_libpassenger_common/Utils/Hasher.o buildout/nginx_dynamic/module_libpassenger_common/AppTypes.o
rm -f buildout/nginx_dynamic/module_libpassenger_common/jsoncpp.o
rm -f buildout/nginx_dynamic/module_libpassenger_common/vendor-modified/modp_b64.o buildout/nginx_dynamic/module_libpassenger_common/vendor-modified/modp_b64_strict_aliasing.o
rm -f buildout/nginx_dynamic/module_libpassenger_common/UnionStationFilterSupport.o
rm -rf buildout/nginx_dynamic/module_libpassenger_common
mkdir -p buildout/support-binaries
c++ -o buildout/support-binaries/AgentMain.o  -Isrc/agent -Isrc/cxx_supportlib -Isrc/cxx_supportlib/vendor-copy -Isrc/cxx_supportlib/vendor-modified -Isrc/cxx_supportlib/vendor-modified/libev -Isrc/cxx_supportlib/vendor-copy/libuv/include -D_REENTRANT -I/usr/local/include -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -Wno-missing-field-initializers -feliminate-unused-debug-symbols -feliminate-unused-debug-types -fvisibility=hidden -DVISIBILITY_ATTRIBUTE_SUPPORTED -Wno-attributes -ggdb -DHAS_ALLOCA_H -DHAS_SFENCE -DHAS_LFENCE -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -DHASH_NAMESPACE="__gnu_cxx" -DHASH_MAP_HEADER="<ext/hash_map>" -DHASH_MAP_CLASS="hash_map" -DHASH_FUN_H="<ext/hash_fun.h>" -c src/agent/AgentMain.cpp
c++ -o buildout/support-binaries/AgentBase.o  -Isrc/agent -Isrc/cxx_supportlib -Isrc/cxx_supportlib/vendor-copy -Isrc/cxx_supportlib/vendor-modified -Isrc/cxx_supportlib/vendor-modified/libev -Isrc/cxx_supportlib/vendor-copy/libuv/include -D_REENTRANT -I/usr/local/include -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -Wno-missing-field-initializers -feliminate-unused-debug-symbols -feliminate-unused-debug-types -fvisibility=hidden -DVISIBILITY_ATTRIBUTE_SUPPORTED -Wno-attributes -ggdb -DHAS_ALLOCA_H -DHAS_SFENCE -DHAS_LFENCE -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -DHASH_NAMESPACE="__gnu_cxx" -DHASH_MAP_HEADER="<ext/hash_map>" -DHASH_MAP_CLASS="hash_map" -DHASH_FUN_H="<ext/hash_fun.h>" -c src/agent/Shared/Base.cpp
c++ -o buildout/support-binaries/WatchdogMain.o  -Isrc/agent -Isrc/cxx_supportlib -Isrc/cxx_supportlib/vendor-copy -Isrc/cxx_supportlib/vendor-modified -Isrc/cxx_supportlib/vendor-modified/libev -Isrc/cxx_supportlib/vendor-copy/libuv/include -D_REENTRANT -I/usr/local/include -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -Wno-missing-field-initializers -feliminate-unused-debug-symbols -feliminate-unused-debug-types -fvisibility=hidden -DVISIBILITY_ATTRIBUTE_SUPPORTED -Wno-attributes -ggdb -DHAS_ALLOCA_H -DHAS_SFENCE -DHAS_LFENCE -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -DHASH_NAMESPACE="__gnu_cxx" -DHASH_MAP_HEADER="<ext/hash_map>" -DHASH_MAP_CLASS="hash_map" -DHASH_FUN_H="<ext/hash_fun.h>" -c src/agent/Watchdog/WatchdogMain.cpp
src/cxx_supportlib/Utils/JsonUtils.h: In function ‘Json::Value Passenger::byteSpeedToJson(double, const std::string&)’:
src/cxx_supportlib/Utils/JsonUtils.h:327: warning: passing ‘double’ for argument 1 to ‘Json::Value Passenger::byteSizeToJson(size_t)’
src/cxx_supportlib/Utils/JsonUtils.h:329: warning: passing ‘double’ for argument 1 to ‘Json::Value Passenger::signedByteSizeToJson(long long int)’
src/cxx_supportlib/Utils/JsonUtils.h: In function ‘Json::Value Passenger::byteSpeedToJson(double, double, const std::string&)’:
src/cxx_supportlib/Utils/JsonUtils.h:341: warning: passing ‘double’ for argument 1 to ‘Json::Value Passenger::byteSizeToJson(size_t)’
src/cxx_supportlib/Utils/JsonUtils.h:343: warning: passing ‘double’ for argument 1 to ‘Json::Value Passenger::signedByteSizeToJson(long long int)’
src/cxx_supportlib/ServerKit/HeaderTable.h: In member function ‘void Passenger::ServerKit::HeaderTable::repopulate(unsigned int)’:
src/cxx_supportlib/ServerKit/HeaderTable.h:128: warning: comparison between signed and unsigned integer expressions
src/cxx_supportlib/Integrations/LibevJsonUtils.h: In function ‘Json::Value Passenger::evTimeToJson(ev_tstamp, ev_tstamp, long long unsigned int)’:
src/cxx_supportlib/Integrations/LibevJsonUtils.h:65: warning: converting to ‘long long unsigned int’ from ‘ev_tstamp’
src/cxx_supportlib/Integrations/LibevJsonUtils.h:82: warning: passing ‘ev_tstamp’ for argument 1 to ‘std::string Passenger::distanceOfTimeInWords(time_t, time_t)’
src/cxx_supportlib/Integrations/LibevJsonUtils.h:82: warning: passing ‘ev_tstamp’ for argument 2 to ‘std::string Passenger::distanceOfTimeInWords(time_t, time_t)’
src/cxx_supportlib/Integrations/LibevJsonUtils.h:84: warning: passing ‘ev_tstamp’ for argument 1 to ‘std::string Passenger::distanceOfTimeInWords(time_t, time_t)’
src/cxx_supportlib/Integrations/LibevJsonUtils.h:84: warning: passing ‘ev_tstamp’ for argument 2 to ‘std::string Passenger::distanceOfTimeInWords(time_t, time_t)’
c++ -o buildout/support-binaries/CoreMain.o  -Isrc/agent -Isrc/cxx_supportlib -Isrc/cxx_supportlib/vendor-copy -Isrc/cxx_supportlib/vendor-modified -Isrc/cxx_supportlib/vendor-modified/libev -Isrc/cxx_supportlib/vendor-copy/libuv/include -D_REENTRANT -I/usr/local/include -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -Wno-missing-field-initializers -feliminate-unused-debug-symbols -feliminate-unused-debug-types -fvisibility=hidden -DVISIBILITY_ATTRIBUTE_SUPPORTED -Wno-attributes -ggdb -DHAS_ALLOCA_H -DHAS_SFENCE -DHAS_LFENCE -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -DHASH_NAMESPACE="__gnu_cxx" -DHASH_MAP_HEADER="<ext/hash_map>" -DHASH_MAP_CLASS="hash_map" -DHASH_FUN_H="<ext/hash_fun.h>" -c src/agent/Core/CoreMain.cpp
src/cxx_supportlib/Utils/JsonUtils.h: In function ‘Json::Value Passenger::byteSpeedToJson(double, const std::string&)’:
src/cxx_supportlib/Utils/JsonUtils.h:327: warning: passing ‘double’ for argument 1 to ‘Json::Value Passenger::byteSizeToJson(size_t)’
src/cxx_supportlib/Utils/JsonUtils.h:329: warning: passing ‘double’ for argument 1 to ‘Json::Value Passenger::signedByteSizeToJson(long long int)’
src/cxx_supportlib/Utils/JsonUtils.h: In function ‘Json::Value Passenger::byteSpeedToJson(double, double, const std::string&)’:
src/cxx_supportlib/Utils/JsonUtils.h:341: warning: passing ‘double’ for argument 1 to ‘Json::Value Passenger::byteSizeToJson(size_t)’
src/cxx_supportlib/Utils/JsonUtils.h:343: warning: passing ‘double’ for argument 1 to ‘Json::Value Passenger::signedByteSizeToJson(long long int)’
src/cxx_supportlib/ServerKit/HeaderTable.h: In member function ‘void Passenger::ServerKit::HeaderTable::repopulate(unsigned int)’:
src/cxx_supportlib/ServerKit/HeaderTable.h:128: warning: comparison between signed and unsigned integer expressions
src/cxx_supportlib/Integrations/LibevJsonUtils.h: In function ‘Json::Value Passenger::evTimeToJson(ev_tstamp, ev_tstamp, long long unsigned int)’:
src/cxx_supportlib/Integrations/LibevJsonUtils.h:65: warning: converting to ‘long long unsigned int’ from ‘ev_tstamp’
src/cxx_supportlib/Integrations/LibevJsonUtils.h:82: warning: passing ‘ev_tstamp’ for argument 1 to ‘std::string Passenger::distanceOfTimeInWords(time_t, time_t)’
src/cxx_supportlib/Integrations/LibevJsonUtils.h:82: warning: passing ‘ev_tstamp’ for argument 2 to ‘std::string Passenger::distanceOfTimeInWords(time_t, time_t)’
src/cxx_supportlib/Integrations/LibevJsonUtils.h:84: warning: passing ‘ev_tstamp’ for argument 1 to ‘std::string Passenger::distanceOfTimeInWords(time_t, time_t)’
src/cxx_supportlib/Integrations/LibevJsonUtils.h:84: warning: passing ‘ev_tstamp’ for argument 2 to ‘std::string Passenger::distanceOfTimeInWords(time_t, time_t)’
src/agent/Core/SecurityUpdateChecker.h: In member function ‘void Passenger::SecurityUpdateChecker::logUpdateFailCurl(CURLcode)’:
src/agent/Core/SecurityUpdateChecker.h:113: error: ‘CURLE_PEER_FAILED_VERIFICATION’ was not declared in this scope
src/agent/Core/SecurityUpdateChecker.h:119: error: ‘CURLE_SSL_CACERT_BADFILE’ was not declared in this scope
src/cxx_supportlib/DataStructures/StringKeyTable.h: In member function ‘void Passenger::StringKeyTable<T, MoveSupport>::repopulate(unsigned int) [with T = std::basic_string<char, std::char_traits<char>, std::allocator<char> >, MoveSupport = Passenger::SKT_DisableMoveSupport]’:
src/cxx_supportlib/DataStructures/StringKeyTable.h:265:   instantiated from ‘void Passenger::StringKeyTable<T, MoveSupport>::realInsert(const Passenger::HashedStaticString&, ValueType, bool) [with ValueType = const std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, LocalMoveSupport = Passenger::SKT_DisableMoveSupport, T = std::basic_string<char, std::char_traits<char>, std::allocator<char> >, MoveSupport = Passenger::SKT_DisableMoveSupport]’
src/cxx_supportlib/DataStructures/StringKeyTable.h:434:   instantiated from ‘void Passenger::StringKeyTable<T, MoveSupport>::insert(const Passenger::HashedStaticString&, const T&, bool) [with T = std::basic_string<char, std::char_traits<char>, std::allocator<char> >, MoveSupport = Passenger::SKT_DisableMoveSupport]’
src/agent/Shared/ApiServerUtils.h:938:   instantiated from ‘void Passenger::apiServerProcessReinheritLogs(Server*, Client*, Request*, const Passenger::StaticString&, const Passenger::StaticString&) [with Server = Passenger::Core::ApiServer::ApiServer, Client = Passenger::ServerKit::HttpClient<Passenger::Core::ApiServer::Request>, Request = Passenger::Core::ApiServer::Request]’
src/agent/Core/ApiServer.h:129:   instantiated from here
src/cxx_supportlib/DataStructures/StringKeyTable.h:178: warning: comparison between signed and unsigned integer expressions
src/cxx_supportlib/DataStructures/StringKeyTable.h: In member function ‘uint32_t Passenger::StringKeyTable<T, MoveSupport>::appendToStorage(const Passenger::StaticString&) [with T = std::basic_string<char, std::char_traits<char>, std::allocator<char> >, MoveSupport = Passenger::SKT_DisableMoveSupport]’:
src/cxx_supportlib/DataStructures/StringKeyTable.h:269:   instantiated from ‘void Passenger::StringKeyTable<T, MoveSupport>::realInsert(const Passenger::HashedStaticString&, ValueType, bool) [with ValueType = const std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, LocalMoveSupport = Passenger::SKT_DisableMoveSupport, T = std::basic_string<char, std::char_traits<char>, std::allocator<char> >, MoveSupport = Passenger::SKT_DisableMoveSupport]’
src/cxx_supportlib/DataStructures/StringKeyTable.h:434:   instantiated from ‘void Passenger::StringKeyTable<T, MoveSupport>::insert(const Passenger::HashedStaticString&, const T&, bool) [with T = std::basic_string<char, std::char_traits<char>, std::allocator<char> >, MoveSupport = Passenger::SKT_DisableMoveSupport]’
src/agent/Shared/ApiServerUtils.h:938:   instantiated from ‘void Passenger::apiServerProcessReinheritLogs(Server*, Client*, Request*, const Passenger::StaticString&, const Passenger::StaticString&) [with Server = Passenger::Core::ApiServer::ApiServer, Client = Passenger::ServerKit::HttpClient<Passenger::Core::ApiServer::Request>, Request = Passenger::Core::ApiServer::Request]’
src/agent/Core/ApiServer.h:129:   instantiated from here
src/cxx_supportlib/DataStructures/StringKeyTable.h:157: warning: converting to ‘unsigned int’ from ‘double’
rake aborted!
Command failed with status (1): [c++ -o buildout/support-binaries/CoreMain.o  -Isrc/agent -Isrc/cxx_supportlib -Isrc/cxx_supportlib/vendor-copy -Isrc/cxx_supportlib/vendor-modified -Isrc/cxx_supportlib/vendor-modified/libev -Isrc/cxx_supportlib/vendor-copy/libuv/include -D_REENTRANT -I/usr/local/include -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -Wno-missing-field-initializers -feliminate-unused-debug-symbols -feliminate-unused-debug-types -fvisibility=hidden -DVISIBILITY_ATTRIBUTE_SUPPORTED -Wno-attributes -ggdb -DHAS_ALLOCA_H -DHAS_SFENCE -DHAS_LFENCE -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -DHASH_NAMESPACE="__gnu_cxx" -DHASH_MAP_HEADER="<ext/hash_map>" -DHASH_MAP_CLASS="hash_map" -DHASH_FUN_H="<ext/hash_fun.h>" -c src/agent/Core/CoreMain.cpp]

Tasks: TOP => nginx => nginx_without_native_support => buildout/support-binaries/PassengerAgent => buildout/support-binaries/CoreMain.o
(See full trace by running task with --trace)
--------------------------------------------

It looks like something went wrong

Please read our documentation for troubleshooting tips:

   https://www.phusionpassenger.com/library/install/nginx/
   https://www.phusionpassenger.com/library/admin/nginx/troubleshooting/

If that doesn't help, please use our support facilities. We'll do our best to help you.

   https://www.phusionpassenger.com/documentation_and_support

请帮忙,我检查了建议的链接和网络上的解决方案以解决问题,但没有任何作用。

安装的乘客版本: Phusion Passenger 5.1.1

2 个答案:

答案 0 :(得分:1)

我建议使用ubuntu作为操作系统来部署rails应用程序,更有效的配置是使用Puma作为您的Web服务器,使用Nginx作为反向代理。

您可以参考GoRails以获得更好的理解体验。

答案 1 :(得分:1)

你的卷发太旧了; 10年前,test_utilsCURLE_PEER_FAILED_VERIFICATION被添加到卷曲中,而Passenger依赖于他们在那里。