gpt4 book ai didi

android - 在 Ubuntu 中通过 npm 安装 appium 时出现构建错误

转载 作者:行者123 更新时间:2023-12-04 18:36:47 24 4
gpt4 key购买 nike

我一直在尝试设置 Appium 在 Ubuntu 机器上运行 Android 测试。这是我到目前为止所做的:

  • 设置JRE和JDK(并设置系统变量);
  • 在不使用 sudo 的情况下安装了 node.js/npm;
  • 已安装 Android SDK 和 API Level 22(并设置系统
    变量);
  • 已安装 Apache Ant(尚未配置);
  • 已安装 git(并在 gitconfig 上设置名称和电子邮件)

  • 当我运行 npm install -g appium , 我有:
    gyp ERR! build error
    gyp ERR! stack Error: `make` failed with exit code: 2
    gyp ERR! stack at ChildProcess.onExit (/home/andre/node-v0.12.1-linux-x64/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
    gyp ERR! stack at ChildProcess.emit (events.js:110:17)
    gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1067:12)
    gyp ERR! System Linux 3.13.0-32-generic
    gyp ERR! command "node" "/home/andre/node-v0.12.1-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
    gyp ERR! cwd /home/andre/node-v0.12.1-linux-x64/lib/node_modules/appium/node_modules/ws/node_modules/utf-8-validate
    gyp ERR! node -v v0.12.1
    gyp ERR! node-gyp -v v1.0.2
    gyp ERR! not ok
    gyp ERR! build error
    gyp ERR! stack Error: `make` failed with exit code: 2
    gyp ERR! stack at ChildProcess.onExit (/home/andre/node-v0.12.1-linux-x64/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
    gyp ERR! stack at ChildProcess.emit (events.js:110:17)
    gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1067:12)
    gyp ERR! System Linux 3.13.0-32-generic
    gyp ERR! command "node" "/home/andre/node-v0.12.1-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
    gyp ERR! cwd /home/andre/node-v0.12.1-linux-x64/lib/node_modules/appium/node_modules/ws/node_modules/bufferutil
    gyp ERR! node -v v0.12.1
    gyp ERR! node-gyp -v v1.0.2
    gyp ERR! not ok
    npm WARN optional dep failed, continuing utf-8-validate@1.0.1
    npm WARN optional dep failed, continuing bufferutil@1.0.1
    npm WARN engine hawk@0.10.2: wanted: {"node":"0.8.x"} (current: {"node":"0.12.1","npm":"2.5.1"})
    npm WARN engine sntp@0.1.4: wanted: {"node":"0.8.x"} (current: {"node":"0.12.1","npm":"2.5.1"})
    npm WARN engine hoek@0.7.6: wanted: {"node":"0.8.x"} (current: {"node":"0.12.1","npm":"2.5.1"})
    npm WARN engine boom@0.3.8: wanted: {"node":"0.8.x"} (current: {"node":"0.12.1","npm":"2.5.1"})
    npm WARN engine cryptiles@0.1.3: wanted: {"node":"0.8.x"} (current: {"node":"0.12.1","npm":"2.5.1"})
    npm ERR! git clone git://github.com/vojtajina/traceur-compiler Cloning into bare repository '/home/andre/.npm/_git-remotes/git-github-com-vojtajina-traceur-compiler-f4c43c65'...
    npm ERR! git clone git://github.com/vojtajina/traceur-compiler fatal: unable to connect to github.com:
    npm ERR! git clone git://github.com/vojtajina/traceur-compiler github.com[0: 192.30.252.128]: errno=Refused connection
    npm ERR! Linux 3.13.0-32-generic
    npm ERR! argv "/home/andre/node-v0.12.1-linux-x64/bin/node" "/home/andre/node-v0.12.1-linux-x64/bin/npm" "install" "-g" "appium"
    npm ERR! node v0.12.1
    npm ERR! npm v2.5.1
    npm ERR! code 128
    npm ERR! Command failed: git clone --template=/home/andre/.npm/_git-remotes/_templates --mirror git://github.com/vojtajina/traceur-compiler /home/andre/.npm/_git-remotes/git-github-com-vojtajina-traceur-compiler-f4c43c65
    npm ERR! Cloning into bare repository '/home/andre/.npm/_git-remotes/git-github-com-vojtajina-traceur-compiler-f4c43c65'...
    npm ERR! fatal: unable to connect to github.com:
    npm ERR! github.com[0: 192.30.252.128]: errno=Refused connection
    npm ERR!
    npm ERR!
    npm ERR!
    npm ERR! If you need help, you may report this error at:
    npm ERR! <http://github.com/npm/npm/issues>
    npm ERR! Please include the following file with any support request:
    npm ERR! /home/andre/npm-debug.log

    最佳答案

    按照这个链接:
    我已经创建了在 linux 上安装 Appium 的分步过程

    http://install-appium-on-linux.blogspot.com/2015/01/install-ruby-sudo-apt-get-install-build.html

    关于android - 在 Ubuntu 中通过 npm 安装 appium 时出现构建错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29266945/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com