错误:命令' cc' pip install pyv8时退出状态为1失败

时间:2016-06-15 14:49:47

标签: python

➜  ~ pip install PyV8
The directory '/Users/yejianfeng/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/yejianfeng/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting PyV8
  Downloading PyV8-0.5.zip
Installing collected packages: PyV8
  Running setup.py install for PyV8 ... error
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-BWDFp1/PyV8/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-O653uB-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.10-intel-2.7
    copying PyV8.py -> build/lib.macosx-10.10-intel-2.7
    running build_ext
    building '_PyV8' extension
    creating build/temp.macosx-10.10-intel-2.7
    creating build/temp.macosx-10.10-intel-2.7/src
    cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -DBOOST_PYTHON_STATIC_LIB -Ilib/python/inc -Ilib/boost/inc -Ilib/v8/inc -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/Exception.cpp -o build/temp.macosx-10.10-intel-2.7/src/Exception.o
    In file included from src/Exception.cpp:1:
    src/Exception.h:50:40: error: 'New' is a private member of 'v8::PersistentBase<v8::Value>'
          m_exc(v8::Persistent<v8::Value>::New(try_catch.Exception())),
                                           ^
    /usr/local/include/v8.h:667:23: note: declared private here
      V8_INLINE static T* New(Isolate* isolate, T* that);
                          ^
    In file included from src/Exception.cpp:1:
    src/Exception.h:50:65: error: too few arguments to function call, expected 2, have 1
          m_exc(v8::Persistent<v8::Value>::New(try_catch.Exception())),
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                      ^
    /usr/local/include/v8.h:667:3: note: 'New' declared here
      V8_INLINE static T* New(Isolate* isolate, T* that);
      ^
    /usr/local/include/v8config.h:297:20: note: expanded from macro 'V8_INLINE'
    # define V8_INLINE inline __attribute__((always_inline))
                       ^
    In file included from src/Exception.cpp:1:
    src/Exception.h:51:42: error: 'New' is a private member of 'v8::PersistentBase<v8::Message>'
          m_msg(v8::Persistent<v8::Message>::New(try_catch.Message()))
                                             ^
    /usr/local/include/v8.h:667:23: note: declared private here
      V8_INLINE static T* New(Isolate* isolate, T* that);
                          ^
    In file included from src/Exception.cpp:1:
    src/Exception.h:51:65: error: too few arguments to function call, expected 2, have 1
          m_msg(v8::Persistent<v8::Message>::New(try_catch.Message()))
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                    ^
    /usr/local/include/v8.h:667:3: note: 'New' declared here
      V8_INLINE static T* New(Isolate* isolate, T* that);
      ^
    /usr/local/include/v8config.h:297:20: note: expanded from macro 'V8_INLINE'
    # define V8_INLINE inline __attribute__((always_inline))
                       ^
    In file included from src/Exception.cpp:1:
    src/Exception.h:63:33: error: no member named 'Dispose' in 'v8::Persistent<v8::Value, v8::NonCopyablePersistentTraits<v8::Value> >'
        if (!m_exc.IsEmpty()) m_exc.Dispose();
                              ~~~~~ ^
    src/Exception.h:64:33: error: no member named 'Dispose' in 'v8::Persistent<v8::Message, v8::NonCopyablePersistentTraits<v8::Message> >'
        if (!m_msg.IsEmpty()) m_msg.Dispose();
                              ~~~~~ ^
    src/Exception.cpp:38:19: error: calling a protected constructor of class 'v8::HandleScope'
      v8::HandleScope handle_scope;
                      ^
    /usr/local/include/v8.h:913:13: note: declared protected here
      V8_INLINE HandleScope() {}
                ^
    src/Exception.cpp:40:25: error: expected ';' after expression
      v8::String::AsciiValue msg(v8::Handle<v8::String>::Cast(m_exc->ToObject()->Get(v8::String::New("name"))));
                            ^
                            ;
    src/Exception.cpp:40:15: error: no member named 'AsciiValue' in 'v8::String'
      v8::String::AsciiValue msg(v8::Handle<v8::String>::Cast(m_exc->ToObject()->Get(v8::String::New("name"))));
      ~~~~~~~~~~~~^
    src/Exception.cpp:40:64: error: member reference type 'v8::Persistent<v8::Value>' is not a pointer; maybe you meant to use '.'?
      v8::String::AsciiValue msg(v8::Handle<v8::String>::Cast(m_exc->ToObject()->Get(v8::String::New("name"))));
                                                              ~~~~~^~
                                                                   .
    src/Exception.cpp:40:66: error: no member named 'ToObject' in 'v8::Persistent<v8::Value, v8::NonCopyablePersistentTraits<v8::Value> >'
      v8::String::AsciiValue msg(v8::Handle<v8::String>::Cast(m_exc->ToObject()->Get(v8::String::New("name"))));
                                                              ~~~~~  ^
    src/Exception.cpp:40:94: error: no member named 'New' in 'v8::String'
      v8::String::AsciiValue msg(v8::Handle<v8::String>::Cast(m_exc->ToObject()->Get(v8::String::New("name"))));
                                                                                     ~~~~~~~~~~~~^
    src/Exception.cpp:42:23: error: use of undeclared identifier 'msg'
      return std::string(*msg, msg.length());
                          ^
    src/Exception.cpp:42:28: error: use of undeclared identifier 'msg'
      return std::string(*msg, msg.length());
                               ^
    src/Exception.cpp:50:19: error: calling a protected constructor of class 'v8::HandleScope'
      v8::HandleScope handle_scope;
                      ^
    /usr/local/include/v8.h:913:13: note: declared protected here
      V8_INLINE HandleScope() {}
                ^
    src/Exception.cpp:52:25: error: expected ';' after expression
      v8::String::AsciiValue msg(v8::Handle<v8::String>::Cast(m_exc->ToObject()->Get(v8::String::New("message"))));
                            ^
                            ;
    src/Exception.cpp:52:15: error: no member named 'AsciiValue' in 'v8::String'
      v8::String::AsciiValue msg(v8::Handle<v8::String>::Cast(m_exc->ToObject()->Get(v8::String::New("message"))));
      ~~~~~~~~~~~~^
    src/Exception.cpp:52:64: error: member reference type 'v8::Persistent<v8::Value>' is not a pointer; maybe you meant to use '.'?
      v8::String::AsciiValue msg(v8::Handle<v8::String>::Cast(m_exc->ToObject()->Get(v8::String::New("message"))));
                                                              ~~~~~^~
                                                                   .
    src/Exception.cpp:52:66: error: no member named 'ToObject' in 'v8::Persistent<v8::Value, v8::NonCopyablePersistentTraits<v8::Value> >'
      v8::String::AsciiValue msg(v8::Handle<v8::String>::Cast(m_exc->ToObject()->Get(v8::String::New("message"))));
                                                              ~~~~~  ^
    fatal error: too many errors emitted, stopping now [-ferror-limit=]
    20 errors generated.
    error: command 'cc' failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-BWDFp1/PyV8/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-O653uB-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-BWDFp1/PyV8/

如何解决这个问题?

0 个答案:

没有答案