【问题标题】:Errors when installing phusion passenger on mac在 mac 上安装 phusion 乘客时出错
【发布时间】:2014-09-25 14:37:14
【问题描述】:

我正在 Mac OSX (10.9.5) 上安装Passenger,但遇到了错误。如果重要的话,Ruby 2.1.2 是通过 rbenv 安装的,我已经安装了 Rails 4.0.0。根据'Agile Web Development with Rails 4'一书,我正在安装Passenger 4.0.8版。输入命令后

> 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.

我已经按照建议的方式查看了文档,但似乎找不到可能导致这些错误的原因。我也在网上看了同样的结果。知道是什么原因造成的吗?我该如何解决?

【问题讨论】:

    标签: ruby-on-rails ruby macos passenger


    【解决方案1】:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-05-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-04-03
      • 2011-10-23
      相关资源
      最近更新 更多