2015-11-12 97 views
2

我在Ubuntu上安裝appium時遇到問題。我嘗試了正常的apt-get安裝方式,發現我不應該那樣做。所以我卸載節點,然後從appium apt-get和我嘗試在這些線程如何在Ubuntu上安裝appium?

How to setup Appium in Ubuntu for android

How to install and run appium in linux?

我做了以下

  1. 安裝RVM列出的指令的變化

    \curl -sSL https://get.rvm.io | bash -s stable --ruby

  2. 安裝Ruby與RVM

    rvm install 2.2.3

  3. 讓我的殼在終端仿真器的選項登錄shell(我使用的終結者,而不是常規的終端)RVM說要做到這一點,而不是rvm --default use 2.2.3當我試圖運行rvm --default時。安裝rvm時安裝的ruby是2.2.1,所以在這一點上我使用Ruby的2.2.1。

  4. 從其他問題線程安裝依賴包。我只是這樣做,因爲其他線程做到了這一點。

    sudo apt-get install build-essential curl m4 texinfo libbz2-dev libcurl4-openssl-dev libexpat-dev libncurses-dev zlib1g-dev

  5. 從這裏https://github.com/Homebrew/linuxbrew

    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/linuxbrew/go/install)"

  6. 安裝Linux的自制讓Linux自制軟件啓動和運行

    brew doctor

    brew install git(我不得不這樣做BEC ause brew doctor說我的git太舊了)

  7. 安裝節點的依賴包。我不得不這樣做,因爲當我試圖運行brew install node它失敗了關於缺少頭文件的編譯錯誤。當我用Google搜索該文件名,有人提到,這需要該文件

    sudo apt-get install libx11-dev

  8. 與釀造安裝gcc包。我必須這樣做,因爲在安裝軟件包後嘗試brew install node之後,我得到了進一步的編譯錯誤。我查了自制軟件github https://github.com/Homebrew/linuxbrew/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+node上的節點錯誤,並說這個錯誤https://github.com/Homebrew/linuxbrew/issues/597說用gcc 5來安裝節點。當我嘗試這個命令時,它說我的gcc太舊了(它是4.6)並且用brew安裝gcc5。

    brew install gcc

  9. 安裝節點

    brew install node --cc=gcc-5

  10. 此時BREW和節點安裝。然後我試着去安裝appium。全球和非全球,他們都失敗了,這是一個巨大的編譯錯誤。 (我不知道如何使stackoverflow的東西把代碼作爲原始文本)。當然,在這一點上,我的智慧已經結束了,我不知道如何使節點編譯appium正確。我不知道如何閱讀這些編譯錯誤並追查他們的真正根源。我將在節點和appium上提交一個錯誤並將其粘貼回來。任何援助將不勝感激。

    [email protected]:~$ npm install -g appium 
    npm WARN optional dep failed, continuing [email protected] 
    npm WARN engine [email protected]: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"4.2.1","npm":"2.14.7"}) 
    
    > [email protected] install /home/username/.linuxbrew/lib/node_modules/appium/node_modules/ws/node_modules/bufferutil 
    > node-gyp rebuild 
    
    make: Entering directory `/home/username/.linuxbrew/lib/node_modules/appium/node_modules/ws/node_modules/bufferutil/build' 
        CXX(target) Release/obj.target/bufferutil/src/bufferutil.o 
    In file included from ../src/bufferutil.cc:16:0: 
    ../node_modules/nan/nan.h:261:25: error: redefinition of 'template<class T> v8::Local<T> _NanEnsureLocal(v8::Local<T>)' 
    NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Local<T> val) { 
             ^
    ../node_modules/nan/nan.h:256:25: note: 'template<class T> v8::Local<T> _NanEnsureLocal(v8::Handle<T>)' previously declared here 
    NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Handle<T> val) { 
             ^
    ../node_modules/nan/nan.h:661:13: error: 'node::smalloc' has not been declared 
        , node::smalloc::FreeCallback callback 
          ^
    ../node_modules/nan/nan.h:661:35: error: expected ',' or '...' before 'callback' 
        , node::smalloc::FreeCallback callback 
               ^
    ../node_modules/nan/nan.h: In function 'v8::Local<v8::Object> NanNewBufferHandle(char*, size_t, int)': 
    ../node_modules/nan/nan.h:665:50: error: 'callback' was not declared in this scope 
         v8::Isolate::GetCurrent(), data, length, callback, hint); 
                   ^
    ../node_modules/nan/nan.h:665:60: error: 'hint' was not declared in this scope 
         v8::Isolate::GetCurrent(), data, length, callback, hint); 
                      ^
    ../node_modules/nan/nan.h: In function 'v8::Local<v8::Object> NanNewBufferHandle(const char*, uint32_t)': 
    ../node_modules/nan/nan.h:672:67: error: no matching function for call to 'New(v8::Isolate*, const char*&, uint32_t&)' 
        return node::Buffer::New(v8::Isolate::GetCurrent(), data, size); 
                       ^
    In file included from ../src/bufferutil.cc:10:0: 
    /home/username/.node-gyp/4.2.1/include/node/node_buffer.h:31:40: note: candidate: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, v8::Local<v8::String>, node::encoding) <near match> 
    NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate, 
                 ^
    /home/username/.node-gyp/4.2.1/include/node/node_buffer.h:31:40: note: conversion of argument 3 would be ill-formed: 
    In file included from ../src/bufferutil.cc:16:0: 
    ../node_modules/nan/nan.h:672:67: error: invalid conversion from 'uint32_t {aka unsigned int}' to 'node::encoding' [-fpermissive] 
        return node::Buffer::New(v8::Isolate::GetCurrent(), data, size); 
                       ^
    In file included from ../src/bufferutil.cc:10:0: 
    /home/username/.node-gyp/4.2.1/include/node/node_buffer.h:43:40: note: candidate: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, char*, size_t) <near match> 
    NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate, 
                 ^
    /home/username/.node-gyp/4.2.1/include/node/node_buffer.h:43:40: note: conversion of argument 2 would be ill-formed: 
    In file included from ../src/bufferutil.cc:16:0: 
    ../node_modules/nan/nan.h:672:67: error: invalid conversion from 'const char*' to 'char*' [-fpermissive] 
        return node::Buffer::New(v8::Isolate::GetCurrent(), data, size); 
                       ^
    ../node_modules/nan/nan.h: In function 'v8::Local<v8::Object> NanNewBufferHandle(uint32_t)': 
    ../node_modules/nan/nan.h:676:29: error: could not convert 'node::Buffer::New(v8::Isolate::GetCurrent(), ((size_t)size))' from 'v8::MaybeLocal<v8::Object>' to 'v8::Local<v8::Object>' 
        return node::Buffer::New(v8::Isolate::GetCurrent(), size); 
              ^
    ../node_modules/nan/nan.h: In function 'v8::Local<v8::Object> NanBufferUse(char*, uint32_t)': 
    ../node_modules/nan/nan.h:683:12: error: 'Use' is not a member of 'node::Buffer' 
        return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size); 
          ^
    make: *** [Release/obj.target/bufferutil/src/bufferutil.o] Error 1 
    make: Leaving directory `/home/username/.linuxbrew/lib/node_modules/appium/node_modules/ws/node_modules/bufferutil/build' 
    gyp ERR! build error 
    gyp ERR! stack Error: `make` failed with exit code: 2 
    gyp ERR! stack  at ChildProcess.onExit (/home/username/.linuxbrew/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23) 
    gyp ERR! stack  at emitTwo (events.js:87:13) 
    gyp ERR! stack  at ChildProcess.emit (events.js:172:7) 
    gyp ERR! stack  at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) 
    gyp ERR! System Linux 3.13.0-66-generic 
    gyp ERR! command "/home/username/.linuxbrew/Cellar/node/4.2.1/bin/node" "/home/username/.linuxbrew/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" 
    gyp ERR! cwd /home/username/.linuxbrew/lib/node_modules/appium/node_modules/ws/node_modules/bufferutil 
    gyp ERR! node -v v4.2.1 
    gyp ERR! node-gyp -v v3.0.3 
    gyp ERR! not ok 
    
    > [email protected] install /home/username/.linuxbrew/lib/node_modules/appium/node_modules/ws/node_modules/utf-8-validate 
    > node-gyp rebuild 
    
    make: Entering directory `/home/username/.linuxbrew/lib/node_modules/appium/node_modules/ws/node_modules/utf-8-validate/build' 
        CXX(target) Release/obj.target/validation/src/validation.o 
    In file included from ../src/validation.cc:15:0: 
    ../node_modules/nan/nan.h:261:25: error: redefinition of 'template<class T> v8::Local<T> _NanEnsureLocal(v8::Local<T>)' 
    NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Local<T> val) { 
             ^
    ../node_modules/nan/nan.h:256:25: note: 'template<class T> v8::Local<T> _NanEnsureLocal(v8::Handle<T>)' previously declared here 
    NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Handle<T> val) { 
             ^
    ../node_modules/nan/nan.h:661:13: error: 'node::smalloc' has not been declared 
        , node::smalloc::FreeCallback callback 
          ^
    ../node_modules/nan/nan.h:661:35: error: expected ',' or '...' before 'callback' 
        , node::smalloc::FreeCallback callback 
               ^
    ../node_modules/nan/nan.h: In function 'v8::Local<v8::Object> NanNewBufferHandle(char*, size_t, int)': 
    ../node_modules/nan/nan.h:665:50: error: 'callback' was not declared in this scope 
         v8::Isolate::GetCurrent(), data, length, callback, hint); 
                   ^
    ../node_modules/nan/nan.h:665:60: error: 'hint' was not declared in this scope 
         v8::Isolate::GetCurrent(), data, length, callback, hint); 
                      ^
    ../node_modules/nan/nan.h: In function 'v8::Local<v8::Object> NanNewBufferHandle(const char*, uint32_t)': 
    ../node_modules/nan/nan.h:672:67: error: no matching function for call to 'New(v8::Isolate*, const char*&, uint32_t&)' 
        return node::Buffer::New(v8::Isolate::GetCurrent(), data, size); 
                       ^
    In file included from ../src/validation.cc:10:0: 
    /home/username/.node-gyp/4.2.1/include/node/node_buffer.h:31:40: note: candidate: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, v8::Local<v8::String>, node::encoding) <near match> 
    NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate, 
                 ^
    /home/username/.node-gyp/4.2.1/include/node/node_buffer.h:31:40: note: conversion of argument 3 would be ill-formed: 
    In file included from ../src/validation.cc:15:0: 
    ../node_modules/nan/nan.h:672:67: error: invalid conversion from 'uint32_t {aka unsigned int}' to 'node::encoding' [-fpermissive] 
        return node::Buffer::New(v8::Isolate::GetCurrent(), data, size); 
                       ^
    In file included from ../src/validation.cc:10:0: 
    /home/username/.node-gyp/4.2.1/include/node/node_buffer.h:43:40: note: candidate: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, char*, size_t) <near match> 
    NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate, 
                 ^
    /home/username/.node-gyp/4.2.1/include/node/node_buffer.h:43:40: note: conversion of argument 2 would be ill-formed: 
    In file included from ../src/validation.cc:15:0: 
    ../node_modules/nan/nan.h:672:67: error: invalid conversion from 'const char*' to 'char*' [-fpermissive] 
        return node::Buffer::New(v8::Isolate::GetCurrent(), data, size); 
                       ^
    ../node_modules/nan/nan.h: In function 'v8::Local<v8::Object> NanNewBufferHandle(uint32_t)': 
    ../node_modules/nan/nan.h:676:29: error: could not convert 'node::Buffer::New(v8::Isolate::GetCurrent(), ((size_t)size))' from 'v8::MaybeLocal<v8::Object>' to 'v8::Local<v8::Object>' 
        return node::Buffer::New(v8::Isolate::GetCurrent(), size); 
              ^
    ../node_modules/nan/nan.h: In function 'v8::Local<v8::Object> NanBufferUse(char*, uint32_t)': 
    ../node_modules/nan/nan.h:683:12: error: 'Use' is not a member of 'node::Buffer' 
        return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size); 
          ^
    make: *** [Release/obj.target/validation/src/validation.o] Error 1 
    make: Leaving directory `/home/username/.linuxbrew/lib/node_modules/appium/node_modules/ws/node_modules/utf-8-validate/build' 
    gyp ERR! build error 
    gyp ERR! stack Error: `make` failed with exit code: 2 
    gyp ERR! stack  at ChildProcess.onExit (/home/username/.linuxbrew/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23) 
    gyp ERR! stack  at emitTwo (events.js:87:13) 
    gyp ERR! stack  at ChildProcess.emit (events.js:172:7) 
    gyp ERR! stack  at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) 
    gyp ERR! System Linux 3.13.0-66-generic 
    gyp ERR! command "/home/username/.linuxbrew/Cellar/node/4.2.1/bin/node" "/home/username/.linuxbrew/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" 
    gyp ERR! cwd /home/username/.linuxbrew/lib/node_modules/appium/node_modules/ws/node_modules/utf-8-validate 
    gyp ERR! node -v v4.2.1 
    gyp ERR! node-gyp -v v3.0.3 
    gyp ERR! not ok 
    npm WARN optional dep failed, continuing [email protected] 
    npm WARN optional dep failed, continuing [email protected] 
    
    > [email protected] install /home/username/.linuxbrew/lib/node_modules/appium/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/utf-8-validate 
    > node-gyp rebuild 
    
    make: Entering directory `/home/username/.linuxbrew/lib/node_modules/appium/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/utf-8-validate/build' 
        CXX(target) Release/obj.target/validation/src/validation.o 
        SOLINK_MODULE(target) Release/obj.target/validation.node 
        COPY Release/validation.node 
    make: Leaving directory `/home/username/.linuxbrew/lib/node_modules/appium/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/utf-8-validate/build' 
    
    > [email protected] install /home/username/.linuxbrew/lib/node_modules/appium/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/bufferutil 
    > node-gyp rebuild 
    
    make: Entering directory `/home/username/.linuxbrew/lib/node_modules/appium/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/bufferutil/build' 
        CXX(target) Release/obj.target/bufferutil/src/bufferutil.o 
        SOLINK_MODULE(target) Release/obj.target/bufferutil.node 
        COPY Release/bufferutil.node 
    make: Leaving directory `/home/username/.linuxbrew/lib/node_modules/appium/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/bufferutil/build' 
    
    > [email protected] install /home/username/.linuxbrew/lib/node_modules/appium/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/utf-8-validate 
    > node-gyp rebuild 
    
    make: Entering directory `/home/username/.linuxbrew/lib/node_modules/appium/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/utf-8-validate/build' 
        CXX(target) Release/obj.target/validation/src/validation.o 
        SOLINK_MODULE(target) Release/obj.target/validation.node 
        COPY Release/validation.node 
    make: Leaving directory `/home/username/.linuxbrew/lib/node_modules/appium/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/utf-8-validate/build' 
    
    > [email protected] install /home/username/.linuxbrew/lib/node_modules/appium/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/bufferutil 
    > node-gyp rebuild 
    
    make: Entering directory `/home/username/.linuxbrew/lib/node_modules/appium/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/bufferutil/build' 
        CXX(target) Release/obj.target/bufferutil/src/bufferutil.o 
        SOLINK_MODULE(target) Release/obj.target/bufferutil.node 
        COPY Release/bufferutil.node 
    make: Leaving directory `/home/username/.linuxbrew/lib/node_modules/appium/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/bufferutil/build' 
    npm WARN engine [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"4.2.1","npm":"2.14.7"}) 
    npm WARN engine [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"4.2.1","npm":"2.14.7"}) 
    npm WARN engine [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"4.2.1","npm":"2.14.7"}) 
    npm WARN engine [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"4.2.1","npm":"2.14.7"}) 
    npm WARN engine [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"4.2.1","npm":"2.14.7"}) 
    npm WARN peerDependencies The peer dependency [email protected]~3 included from cls-bluebird will no 
    npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
    npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly. 
    npm WARN peerDependencies The peer dependency [email protected]>=1.0.3 included from cls-bluebird will no 
    npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
    npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly. 
    /
    > [email protected] install /home/username/.linuxbrew/lib/node_modules/appium/node_modules/appium-chromedriver 
    > node install-npm.js 
    
    info Chromedriver Install Opening temp file to write chromedriver_linux64 to... 
    info Chromedriver Install Downloading http://chromedriver.storage.googleapis.com/2.18/chromedriver_linux64.zip... 
    info Chromedriver Install Writing binary content to /tmp/1151012-17037-1mkrlkq/chromedriver_linux64.zip... 
    info Chromedriver Install Extracting /tmp/1151012-17037-1mkrlkq/chromedriver_linux64.zip to /tmp/1151012-17037-1mkrlkq/chromedriver_linux64 
    info Chromedriver Install Creating /home/username/.linuxbrew/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/linux... 
    info Chromedriver Install Copying unzipped binary, reading from /tmp/1151012-17037-1mkrlkq/chromedriver_linux64/chromedriver... 
    info Chromedriver Install Writing to /home/username/.linuxbrew/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/linux/chromedriver_64... 
    info Chromedriver Install /home/username/.linuxbrew/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/linux/chromedriver_64 successfully put in place 
    /home/username/.linuxbrew/bin/appium -> /home/username/.linuxbrew/lib/node_modules/appium/bin/appium.js 
    /home/username/.linuxbrew/bin/appium-doctor -> /home/username/.linuxbrew/lib/node_modules/appium/bin/appium-doctor.js 
    /home/username/.linuxbrew/bin/authorize_ios -> /home/username/.linuxbrew/lib/node_modules/appium/bin/authorize-ios.js 
    [email protected] /home/username/.linuxbrew/lib/node_modules/appium 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] ([email protected]) 
    ├── [email protected] ([email protected]) 
    ├── [email protected] ([email protected]) 
    ├── [email protected] 
    ├── [email protected] ([email protected]) 
    ├── [email protected] ([email protected]) 
    ├── [email protected] ([email protected]) 
    ├── [email protected] ([email protected]) 
    ├── [email protected] ([email protected], [email protected], [email protected], [email protected]) 
    ├── [email protected] ([email protected], [email protected], [email protected], [email protected]) 
    ├── [email protected] 
    ├── [email protected] ([email protected]) 
    ├── [email protected] ([email protected], [email protected], [email protected], [email protected]) 
    ├── [email protected] 
    ├── [email protected] ([email protected], [email protected], [email protected], [email protected]) 
    ├── [email protected] ([email protected], [email protected], [email protected]) 
    ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) 
    ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) 
    ├── [email protected] ([email protected], [email protected], [email protected], [email protected]) 
    ├── [email protected] ([email protected], [email protected]) 
    ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) 
    ├── [email protected] ([email protected]) 
    ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected]) 
    ├── [email protected] ([email protected], [email protected], [email protected]) 
    ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) 
    ├── [email protected] ([email protected], [email protected]2.4.24) 
    ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) 
    ├── [email protected] ([email protected], [email protected], [email protected]) 
    ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) 
    ├── [email protected] ([email protected], [email protected]) 
    ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) 
    ├── [email protected] ([email protected]) 
    ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected]) 
    ├── [email protected] ([email protected], [email protected]) 
    ├── [email protected] ([email protected], [email protected]) 
    ├── [email protected] ([email protected], [email protected]) 
    ├── [email protected] ([email protected], [email protected], [email protected]) 
    ├── [email protected] ([email protected], [email protected], [email protected]) 
    ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) 
    ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) 
    └── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) 
    [email protected]:~$ 
    

編輯:沒有,我沒有考慮,這是appium實際上已經正確安裝,我不應該關注的一個選項。當我稍後嘗試加載appium時,似乎會加載,儘管我沒有嘗試將其用於移動測試。我的問題是,如果這個輸出確實表明它正在工作,那麼所有的錯誤都是如此。我經歷了一個類似的過程來在MacOSX上安裝Appium,然後我沒有看到所有這些錯誤。爲什麼安裝時出現錯誤?它是否安裝,但這個輸出暴露錯誤?

回答

0

在我看來,只需簽出Appium的GIT項目就可以了。之後,您可以運行./reset.sh將其設置爲&驗證。

0

我在安裝過程中看到了類似的錯誤,但的mocha android-simple.js通過了(使用真實手機)。

0

步驟安裝: 我的系統是:3.19.0-58泛型#64〜14.04.1 Ubuntu的


請下載並着手這部史詩前安裝Android SDK,Java的JDK旅程


添加以下到~./bashrc

ANDROID_HOME=/home/myloc/Android/Sdk 
export PATH=$PATH:/home/myloc/Android/Sdk/tools 

PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig:$PKG_CONFIG_PATH 

#Setup linux brew 
export PATH="$HOME/.linuxbrew/bin:$PATH" 
export MANPATH="$HOME/.linuxbrew/share/man:$MANPATH" 
export INFOPATH="$HOME/.linuxbrew/share/info:$INFOPATH" 

這些都是一些你必須按順序安裝的項目:紅寶石 - > linuxbrew - >節點 - > appium

$ sudo apt-get install build-essential curl git m4 ruby texinfo libbz2-dev libcurl4-openssl-dev libexpat-dev libncurses-dev zlib1g-dev 
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/linuxbrew/go/install)" 
$ brew update 
$ brew install node 
$ brew link node 
$ npm install -g node-gyp 

退房Appium從GitHub回購(或標記的版本,我的是直接從主標後:1.5。1月上-9-2016):

$ git clone https://github.com/appium/appium.git 
$ cd appium_checkout_from_git_location 
$ npm install 

輸入下面的命令是否存在與GYP問題重建:

$ rm -rf ~/.node_gyp 
$ cd appium_checkout_from_git 
$ npm install 
$ npm rebuild 

如果這些仍然沒有工作鍵入以下命令來幫助自己來縮小任何問題,在檢查了混帳回購協議:

$ node bin/appium-doctor.js --dev 

希望這有助於有人,尤其是因爲自從Appium 1.5版本以來,腳本已被刪除。

我的參考文獻:

  1. https://askubuntu.com/questions/729047/how-to-install-and-configure-appium-in-ubuntu (馬克柯比回答,我沒有足夠的積分,給予好評他:()
  2. common.gypi not found error in node.js (由Jedininjaster回答,我沒有足夠的積分以贊同他 太)
0

如果你安裝記住Appium拋出錯誤l通過SUDO。因此,通過npm安裝Appium,通過安裝npm來安裝Appium,您需要node.js和npm 0.12或更高版本。 確保您沒有安裝帶有sudo的節點或Appium。 要安裝沒有sudo的node.js和appium,我們使用linuxbrew。 以下是在Ubuntu 14.04OS上安裝Appium的詳細步驟。

要安裝linuxbrew這些都是依賴 紅寶石1.8.6或更新的版本 GCC 4.2或更新的 GIT中1.7.12.4或更新 Linux的2.6.16或更新 64位x86或32位ARM平臺

安裝步驟 1.安裝紅寶石(命令複製到終端並按下確認鍵)

sudo apt-get install build-essential curl git m4 python-setuptools ruby texinfo libbz2-dev libcurl4-openssl-dev libexpat-dev libncurses-dev zlib1g-dev 
  • 安裝Linux釀酒:(複製共mmand到終端,然後按回車)

    紅寶石-e「$(捲曲-fsSL https://raw.githubusercontent.com/Homebrew/linuxbrew/go/install)」

  • 3.設置路徑在終端釀造 輸入sudo gedit.bashrc和複製下面的中.bashrc file.export PATH =「$ HOME/.linuxbrew/bin:$ PATH」export MANPATH =「$ HOME/.linuxbrew/share/man:$ MANPATH」export INFOPATH =「$ HOME/.linuxbrew/share/info :$ INFOPATH「

    4.安裝節點:打開新終端並複製命令,然後按回車鍵

    brew update 
    brew install node 
    brew link node 
    

    你可能會面臨如下錯誤,而安裝節點:

    ==> make install 
    Last 15 lines from /home/tsepak/.cache/Homebrew/Logs/node/02.make: 
    ../deps/v8/src/base/platform/mutex.h:170:3: error: ‘void v8::operator=(const v8::RecursiveMutex&)’ must be a nonstatic member function 
    ../deps/v8/src/base/platform/mutex.h:184:9: error: ‘LazyStaticInstance’ does not name a type 
    ../deps/v8/src/base/platform/mutex.h:202:17: error: template declaration of ‘LockGuard final’ 
    ../deps/v8/src/base/platform/mutex.h:203:2: error: expected primary-expression before ‘public’ 
    ../deps/v8/src/base/platform/mutex.h:203:2: error: expected ‘}’ before ‘public’ 
    ../deps/v8/src/base/platform/mutex.h:205:14: error: declaration of ‘~LockGuard’ as non-member 
    ../deps/v8/src/base/platform/mutex.h:207:2: error: expected unqualified-id before ‘private’ 
    ../deps/v8/src/base/platform/mutex.h:210:3: error: expected unqualified-id before ‘const’ 
    ../deps/v8/src/base/platform/mutex.h:210:3: error: expected ‘)’ before ‘const’ 
    ../deps/v8/src/base/platform/mutex.h:210:3: error: ‘void operator=(const LockGuard&)’ must be a nonstatic member function 
    ../deps/v8/src/base/platform/mutex.h:211:1: error: expected declaration before ‘}’ token 
    make[1]: *** [/tmp/node20160122-19291-3znamd/node-v5.4.1/out/Release/obj.target/v8_libplatform/deps/v8/src/libplatform/default-platform.o] Error 1 
    make[1]: *** Waiting for unfinished jobs.... 
    make[1]: Leaving directory `/tmp/node20160122-19291-3znamd/node-v5.4.1/out’ 
    make: *** [node] Error 2 
    READTHIS:https://github.com/Linuxbrew/linuxbrew/blob/master/share/doc/homebrew/Troubleshooting.md#troubleshooting 
    

    *******這是一個編譯器的問題。如果您嘗試建立不兼容的編譯器,你將面對上面的錯誤這是一個懸而未決的問題在Git.Try以下 更新GCC 4.9 或嘗試 釀造安裝節點--CC = GCC-5 ****

    即使這不工作卸載linuxbrew並從新鮮開始。

    5.最後安裝Appium:Appium通過npm安裝 安裝npm軟件包有兩種方式:本地或全局。 對於appium,我們需要在全球範圍內安裝npm軟件包。

    npm install -g appium 
    

    6.讓我們來檢查安裝是否成功。 打開終端輸入「appium」並回車 appium

    你應該看到像這樣在終端

    info: Welcome to Appium v1.4.12(REV 8db2d00b9afcf2c50a09a80a2e8d56b05a902caf) 
    info: Appium REST http interface listener started on 0.0.0.0:4723 
    info: Console LogLevel: debug