2014-09-25 122 views
1

我在Mac OSX(10.9.5)上安裝Passenger並且出錯。如果它很重要,Ruby 2.1.2通過rbenv安裝,我安裝了Rails 4.0.0。根據「使用Rails 4進行敏捷Web開發」一書,我正在安裝Passenger 4.0.8版。在終端輸入命令在mac上安裝phusion乘客時出現的錯誤

> sudo passenger-install-apache2-module 

後,它需要我通過一些提示安裝過程,然後我收到以下錯誤部分

In file included from ext/common/Logging.cpp:31: 
In file included from ext/common/Utils/IOUtils.h:39: 
ext/common/FileDescriptor.h:99:2: error: unknown type name 'shared_ptr' 
     shared_ptr<SharedData> data; 
     ^
ext/common/FileDescriptor.h:99:12: error: expected member name or ';' after declaration specifiers 
     shared_ptr<SharedData> data; 
     ~~~~~~~~~~^ 
ext/common/FileDescriptor.h:126:4: error: use of undeclared identifier 'data' 
         data = make_shared<SharedData>(fd, autoClose); 
         ^
ext/common/FileDescriptor.h:145:7: error: use of undeclared identifier 'data'; did you mean 
     'StaticString::data'? 
       if (data != NULL) { 
        ^~~~ 
        StaticString::data 
ext/common/StaticString.h:161:14: note: 'StaticString::data' declared here 
     const char *data() const { 
        ^
In file included from ext/common/Logging.cpp:31: 
In file included from ext/common/Utils/IOUtils.h:39: 
ext/common/FileDescriptor.h:145:7: error: call to non-static member function without an object 
     argument 
       if (data != NULL) { 
        ^~~~ 
ext/common/FileDescriptor.h:146:4: error: use of undeclared identifier 'data'; did you mean 
     'StaticString::data'? 
         data->close(checkErrors); 
         ^~~~ 
         StaticString::data 
ext/common/StaticString.h:161:14: note: 'StaticString::data' declared here 
     const char *data() const { 
        ^
In file included from ext/common/Logging.cpp:31: 
In file included from ext/common/Utils/IOUtils.h:39: 
ext/common/FileDescriptor.h:146:4: error: call to non-static member function without an object 
     argument 
         data->close(checkErrors); 
         ^~~~ 
ext/common/FileDescriptor.h:147:4: error: use of undeclared identifier 'data'; did you mean 
     'StaticString::data'? 
         data.reset(); 
         ^~~~ 
         StaticString::data 
ext/common/StaticString.h:161:14: note: 'StaticString::data' declared here 
     const char *data() const { 
        ^
In file included from ext/common/Logging.cpp:31: 
In file included from ext/common/Utils/IOUtils.h:39: 
ext/common/FileDescriptor.h:147:4: error: call to non-static member function without an object 
     argument 
         data.reset(); 
         ^~~~ 
ext/common/FileDescriptor.h:160:7: error: use of undeclared identifier 'data'; did you mean 
     'StaticString::data'? 
       if (data != NULL) { 
        ^~~~ 
        StaticString::data 
ext/common/StaticString.h:161:14: note: 'StaticString::data' declared here 
     const char *data() const { 
        ^
In file included from ext/common/Logging.cpp:31: 
In file included from ext/common/Utils/IOUtils.h:39: 
ext/common/FileDescriptor.h:160:7: error: call to non-static member function without an object 
     argument 
       if (data != NULL) { 
        ^~~~ 
ext/common/FileDescriptor.h:161:13: error: use of undeclared identifier 'data'; did you mean 
     'StaticString::data'? 
         int fd = data->fd; 
           ^~~~ 
           StaticString::data 
ext/common/StaticString.h:161:14: note: 'StaticString::data' declared here 
     const char *data() const { 
        ^
In file included from ext/common/Logging.cpp:31: 
In file included from ext/common/Utils/IOUtils.h:39: 
ext/common/FileDescriptor.h:161:13: error: call to non-static member function without an object 
     argument 
         int fd = data->fd; 
           ^~~~ 
ext/common/FileDescriptor.h:162:4: error: use of undeclared identifier 'data'; did you mean 
     'StaticString::data'? 
         data->detach(); 
         ^~~~ 
         StaticString::data 
ext/common/StaticString.h:161:14: note: 'StaticString::data' declared here 
     const char *data() const { 
        ^
In file included from ext/common/Logging.cpp:31: 
In file included from ext/common/Utils/IOUtils.h:39: 
ext/common/FileDescriptor.h:162:4: error: call to non-static member function without an object 
     argument 
         data->detach(); 
         ^~~~ 
ext/common/FileDescriptor.h:163:4: error: use of undeclared identifier 'data'; did you mean 
     'StaticString::data'? 
         data.reset(); 
         ^~~~ 
         StaticString::data 
ext/common/StaticString.h:161:14: note: 'StaticString::data' declared here 
     const char *data() const { 
        ^
In file included from ext/common/Logging.cpp:31: 
In file included from ext/common/Utils/IOUtils.h:39: 
ext/common/FileDescriptor.h:163:4: error: call to non-static member function without an object 
     argument 
         data.reset(); 
         ^~~~ 
ext/common/FileDescriptor.h:177:7: error: use of undeclared identifier 'data'; did you mean 
     'StaticString::data'? 
       if (data == NULL) { 
        ^~~~ 
        StaticString::data 
ext/common/StaticString.h:161:14: note: 'StaticString::data' declared here 
     const char *data() const { 
        ^
In file included from ext/common/Logging.cpp:31: 
In file included from ext/common/Utils/IOUtils.h:39: 
ext/common/FileDescriptor.h:177:7: error: call to non-static member function without an object 
     argument 
       if (data == NULL) { 
        ^~~~ 
fatal error: too many errors emitted, stopping now [-ferror-limit=] 
20 errors generated. 
rake aborted! 
Command failed with status (1): [g++ -Iext -Iext/common -Iext/libev -Wno-ambiguous-member-template -fPIC -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -I/usr/include/apr-1 -I/usr/include/apr-1 -I/usr/include/apache2 -D_REENTRANT -I/usr/local/include -DHASH_NAMESPACE="__gnu_cxx" -DHASH_MAP_HEADER="<ext/hash_map>" -DHASH_MAP_CLASS="hash_map" -DHAS_ALLOCA_H -DHAS_SFENCE -DHAS_LFENCE -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -Wno-missing-field-initializers -ggdb -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -fcommon -fvisibility=hidden -DVISIBILITY_ATTRIBUTE_SUPPORTED -o buildout/apache2/module_libpassenger_common/Logging.o -c ext/common/Logging.cpp] 
/Library/Ruby/Gems/2.0.0/gems/passenger-4.0.8/build/cplusplus_support.rb:51:in `run_compiler' 
/Library/Ruby/Gems/2.0.0/gems/passenger-4.0.8/build/cplusplus_support.rb:61:in `compile_cxx' 
/Library/Ruby/Gems/2.0.0/gems/passenger-4.0.8/lib/phusion_passenger/common_library.rb:133:in `block (2 levels) in define_category_tasks' 
Tasks: TOP => apache2 => buildout/apache2/mod_passenger.so => buildout/apache2/module_libpassenger_common/Logging.o 
(See full trace by running task with --trace) 

-------------------------------------------- 

It looks like something went wrong 

Please read our Users guide for troubleshooting tips: 

    /Library/Ruby/Gems/2.0.0/gems/passenger-4.0.8/doc/Users guide Apache.html 

If that doesn't help, please use our support facilities at: 

    https://www.phusionpassenger.com 

We'll do our best to help you. 

我已經通過文件看起來像它建議,但可以似乎沒有找到可能導致這些錯誤的原因。我也在網上看到了相同的結果。任何想法可能導致這種情況?我應該如何解決它?

回答