我在apache上安装乘客模块时遇到错误
In file included from ext/common/AccountsDatabase.h:32:
ext/common/Account.h:171:9: error: unknown type name 'shared_ptr'; did you mean 'scoped_ptr'?
typedef shared_ptr<Account> AccountPtr;
^~~~~~~~~~
scoped_ptr
ext/boost/smart_ptr/scoped_ptr.hpp:39:25: note: 'scoped_ptr' declared here
template<class T> class scoped_ptr // noncopyable
^
In file included from ext/apache2/module_libpassenger_common/aggregate.cpp:5:
In file included from ext/common/AccountsDatabase.cpp:31:
In file included from ext/common/AccountsDatabase.h:32:
ext/common/Account.h:171:19: error: expected unqualified-id
typedef shared_ptr<Account> AccountPtr;
^
In file included from ext/apache2/module_libpassenger_common/aggregate.cpp:5:
In file included from ext/common/AccountsDatabase.cpp:31:
In file included from ext/common/AccountsDatabase.h:33:
In file included from ext/common/ServerInstanceDir.h:42:
ext/common/Utils.h:86:22: error: unknown type name 'shared_ptr'; did you mean 'scoped_ptr'?
template<typename T> shared_ptr<T>
^~~~~~~~~~
scoped_ptr
ext/boost/smart_ptr/scoped_ptr.hpp:39:25: note: 'scoped_ptr' declared here
template<class T> class scoped_ptr // noncopyable
^
In file included from ext/apache2/module_libpassenger_common/aggregate.cpp:5:
In file included from ext/common/AccountsDatabase.cpp:31:
In file included from ext/common/AccountsDatabase.h:33:
In file included from ext/common/ServerInstanceDir.h:42:
ext/common/Utils.h:86:32: error: expected unqualified-id
template<typename T> shared_ptr<T>
^
ext/common/Utils.h:354:34: error: unknown type name 'function'
void runAndPrintExceptions(const function<void ()> &func, bool toAbort);
^
ext/common/Utils.h:354:42: error: expected ')'
void runAndPrintExceptions(const function<void ()> &func, bool toAbort);
^
ext/common/Utils.h:354:27: note: to match this '('
void runAndPrintExceptions(const function<void ()> &func, bool toAbort);
^
ext/common/Utils.h:355:34: error: unknown type name 'function'
void runAndPrintExceptions(const function<void ()> &func);
^
ext/common/Utils.h:355:42: error: expected ')'
void runAndPrintExceptions(const function<void ()> &func);
^
ext/common/Utils.h:355:27: note: to match this '('
void runAndPrintExceptions(const function<void ()> &func);
^
In file included from ext/apache2/module_libpassenger_common/aggregate.cpp:5:
In file included from ext/common/AccountsDatabase.cpp:31:
In file included from ext/common/AccountsDatabase.h:33:
ext/common/ServerInstanceDir.h:191:10: error: unknown type name 'shared_ptr'; did you mean 'scoped_ptr'?
typedef shared_ptr<Generation> GenerationPtr;
^~~~~~~~~~
scoped_ptr
ext/boost/smart_ptr/scoped_ptr.hpp:39:25: note: 'scoped_ptr' declared here
template<class T> class scoped_ptr // noncopyable
^
In file included from ext/apache2/module_libpassenger_common/aggregate.cpp:5:
In file included from ext/common/AccountsDatabase.cpp:31:
In file included from ext/common/AccountsDatabase.h:33:
ext/common/ServerInstanceDir.h:191:20: error: expected member name or ';' after declaration specifiers
typedef shared_ptr<Generation> GenerationPtr;
~~~~~~~~~~~~~~~~~~^
ext/common/ServerInstanceDir.h:291:2: error: unknown type name 'GenerationPtr'; did you mean 'Generation'?
GenerationPtr newGeneration(bool userSwitching, const string &defaultUser,
^~~~~~~~~~~~~
Generation
ext/common/ServerInstanceDir.h:58:8: note: 'Generation' declared here
class Generation: public noncopyable {
^
ext/common/ServerInstanceDir.h:309:2: error: unknown type name 'GenerationPtr'; did you mean 'Generation'?
GenerationPtr getGeneration(unsigned int number) const {
^~~~~~~~~~~~~
Generation
ext/common/ServerInstanceDir.h:58:8: note: 'Generation' declared here
class Generation: public noncopyable {
^
ext/common/ServerInstanceDir.h:313:2: error: unknown type name 'GenerationPtr'; did you mean 'Generation'?
GenerationPtr getNewestGeneration() const {
^~~~~~~~~~~~~
Generation
ext/common/ServerInstanceDir.h:58:8: note: 'Generation' declared here
class Generation: public noncopyable {
^
ext/common/ServerInstanceDir.h:267:4: error: unknown type name 'GenerationPtr'; did you mean 'Generation'?
GenerationPtr newestGeneration;
^~~~~~~~~~~~~
Generation
ext/common/ServerInstanceDir.h:58:8: note: 'Generation' declared here
class Generation: public noncopyable {
^
ext/common/ServerInstanceDir.h:267:18: error: no matching constructor for initialization of 'Passenger::ServerInstanceDir::Generation'
GenerationPtr newestGeneration;
^
ext/common/ServerInstanceDir.h:58:8: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 0 were provided
class Generation: public noncopyable {
^
ext/common/ServerInstanceDir.h:66:3: note: candidate constructor not viable: requires 2 arguments, but 0 were provided
Generation(const string &serverInstanceDir, unsigned int number) {
^
ext/common/ServerInstanceDir.h:295:3: error: unknown type name 'GenerationPtr'; did you mean 'Generation'?
GenerationPtr newestGeneration = getNewestGeneration();
^~~~~~~~~~~~~
Generation
ext/common/ServerInstanceDir.h:58:8: note: 'Generation' declared here
class Generation: public noncopyable {
^
ext/common/ServerInstanceDir.h:58:8: error: base class 'boost::noncopyable_::noncopyable' has private copy constructor
class Generation: public noncopyable {
^
ext/boost/noncopyable.hpp:27:7: note: declared private here
noncopyable( const noncopyable& );
^
ext/common/ServerInstanceDir.h:295:36: note: implicit copy constructor for 'Passenger::ServerInstanceDir::Generation' first required here
GenerationPtr newestGeneration = getNewestGeneration();
^
ext/common/ServerInstanceDir.h:297:24: warning: comparison between NULL and non-pointer ('Passenger::ServerInstanceDir::Generation' and NULL) [-Wnull-arithmetic]
if (newestGeneration != NULL) {
~~~~~~~~~~~~~~~~ ^ ~~~~
ext/common/ServerInstanceDir.h:297:24: error: invalid operands to binary expression ('Passenger::ServerInstanceDir::Generation' and 'long')
if (newestGeneration != NULL) {
~~~~~~~~~~~~~~~~ ^ ~~~~
ext/common/StaticString.h:288:1: note: candidate function not viable: no known conversion from 'Passenger::ServerInstanceDir::Generation' to 'const string' (aka
'const basic_string<char, char_traits<char>, allocator<char> >') for 1st argument
operator!=(const string &other, const StaticString &str) {
^
ext/common/StaticString.h:293:1: note: candidate function not viable: no known conversion from 'Passenger::ServerInstanceDir::Generation' to 'const char *' for 1st argument
operator!=(const char *other, const StaticString &str) {
^
In file included from ext/apache2/module_libpassenger_common/aggregate.cpp:5:
In file included from ext/common/AccountsDatabase.cpp:31:
In file included from ext/common/AccountsDatabase.h:33:
ext/common/ServerInstanceDir.h:298:32: error: member reference type 'Passenger::ServerInstanceDir::Generation' is not a pointer; maybe you meant to use '.'?
newNumber = newestGeneration->getNumber() + 1;
~~~~~~~~~~~~~~~~^~
.
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
rake aborted!
Command failed with status (1): [g++ -Iext -Iext/common -Iext/libev -fPIC -...]
/Users/msingh/.rvm/gems/ruby-1.9.3-p194@showroom/gems/passenger-3.0.15/build/cplusplus_support.rb:31:in `compile_cxx'
/Users/msingh/.rvm/gems/ruby-1.9.3-p194@showroom/gems/passenger-3.0.15/build/common_library.rb:126:in `block in define_common_library_task'
/Users/msingh/.rvm/gems/ruby-1.9.3-p194@showroom/bin/ruby_executable_hooks:15:in `eval'
/Users/msingh/.rvm/gems/ruby-1.9.3-p194@showroom/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => apache2 => ext/apache2/mod_passenger.so => ext/apache2/module_libpassenger_common.a => ext/apache2/module_libpassenger_common/aggregate.o
(See full trace by running task with --trace)
--------------------------------------------
It looks like something went wrong
我在应用程序上执行passenger-install-apache2-module时会得到这个