Android 在Ubuntu中通过npm安装appium时生成错误

Android 在Ubuntu中通过npm安装appium时生成错误,android,git,ubuntu,automated-tests,appium,Android,Git,Ubuntu,Automated Tests,Appium,我一直在尝试设置Appium在Ubuntu机器上运行Android测试。以下是我迄今为止所做的工作: 设置JRE和JDK(并设置系统变量) 未使用sudo安装node.js/npm 已安装Android SDK和API级别22(和设置系统 变量) 已安装Apache Ant(尚未配置) 已安装git(并在gitconfig上设置名称和电子邮件) 当我运行npm安装-g appium时,我得到: gyp ERR!构建错误 哎呀!堆栈错误:`make`失败,退出代码:2 哎呀!堆栈位于Child

我一直在尝试设置Appium在Ubuntu机器上运行Android测试。以下是我迄今为止所做的工作:

  • 设置JRE和JDK(并设置系统变量)
  • 未使用sudo安装node.js/npm
  • 已安装Android SDK和API级别22(和设置系统 变量)
  • 已安装Apache Ant(尚未配置)
  • 已安装git(并在gitconfig上设置名称和电子邮件)
当我运行npm安装-g appium时,我得到:

gyp ERR!构建错误
哎呀!堆栈错误:`make`失败,退出代码:2
哎呀!堆栈位于ChildProcess.onExit(/home/andre/node-v0.12.1-linux-x64/lib/node_modules/npm/node_modules/node gyp/lib/build.js:267:23)
哎呀!ChildProcess.emit上的堆栈(events.js:110:17)
哎呀!在Process.ChildProcess.\u handle.onexit(child\u Process.js:1067:12)处堆栈
哎呀!Linux系统3.13.0-32-generic
哎呀!命令“node”“/home/andre/node-v0.12.1-linux-x64/lib/node_modules/npm/node_modules/node gyp/bin/node gyp.js”“重建”
哎呀!cwd/home/andre/node-v0.12.1-linux-x64/lib/node_modules/appium/node_modules/ws/node_modules/utf-8-validate
哎呀!节点-v v0.12.1
哎呀!节点gyp-v1.0.2
哎呀!不好
哎呀!构建错误
哎呀!堆栈错误:`make`失败,退出代码:2
哎呀!堆栈位于ChildProcess.onExit(/home/andre/node-v0.12.1-linux-x64/lib/node_modules/npm/node_modules/node gyp/lib/build.js:267:23)
哎呀!ChildProcess.emit上的堆栈(events.js:110:17)
哎呀!在Process.ChildProcess.\u handle.onexit(child\u Process.js:1067:12)处堆栈
哎呀!Linux系统3.13.0-32-generic
哎呀!命令“node”“/home/andre/node-v0.12.1-linux-x64/lib/node_modules/npm/node_modules/node gyp/bin/node gyp.js”“重建”
哎呀!cwd/home/andre/node-v0.12.1-linux-x64/lib/node_modules/appium/node_modules/ws/node_modules/bufferutil
哎呀!节点-v v0.12.1
哎呀!节点gyp-v1.0.2
哎呀!不好
npm警告可选dep失败,继续utf-8-validate@1.0.1
npm警告可选dep失败,继续bufferutil@1.0.1
警告引擎hawk@0.10.2:通缉:{“节点”:“0.8.x”}(当前:{“节点”:“0.12.1”,“npm”:“2.5.1”})
警告引擎sntp@0.1.4:通缉:{“节点”:“0.8.x”}(当前:{“节点”:“0.12.1”,“npm”:“2.5.1”})
警告引擎hoek@0.7.6:通缉:{“节点”:“0.8.x”}(当前:{“节点”:“0.12.1”,“npm”:“2.5.1”})
警告引擎boom@0.3.8:通缉:{“节点”:“0.8.x”}(当前:{“节点”:“0.12.1”,“npm”:“2.5.1”})
警告引擎cryptiles@0.1.3:通缉:{“节点”:“0.8.x”}(当前:{“节点”:“0.12.1”,“npm”:“2.5.1”})
npm错误!git克隆git://github.com/vojtajina/traceur-compiler 克隆到裸存储库“/home/andre/.npm/_git-remotes/git-github-com-vojtajina-traceur-compiler-f4c43c65”。。。
npm错误!git克隆git://github.com/vojtajina/traceur-compiler 致命:无法连接到github.com:
npm错误!git克隆git://github.com/vojtajina/traceur-compiler github.com[0:192.30.252.128]:errno=拒绝连接
npm错误!Linux 3.13.0-32-generic
npm错误!argv“/home/andre/node-v0.12.1-linux-x64/bin/node”“/home/andre/node-v0.12.1-linux-x64/bin/npm”“安装”“-g”“应用程序”
npm错误!节点v0.12.1
npm错误!npm v2.5.1
npm错误!代码128
npm错误!命令失败:git clone--template=/home/andre/.npm/\u git-remotes/\u templates--mirrorgit://github.com/vojtajina/traceur-compiler /home/andre/.npm/_git-remotes/git-github-com-vojtajina-traceur-compiler-f4c43c65
npm错误!克隆到裸存储库“/home/andre/.npm/_git-remotes/git-github-com-vojtajina-traceur-compiler-f4c43c65”。。。
npm错误!致命:无法连接到github.com:
npm错误!github.com[0:192.30.252.128]:errno=拒绝连接
npm错误!
npm错误!
npm错误!
npm错误!如果需要帮助,您可以在以下位置报告此错误:
npm错误!
npm错误!请在任何支持请求中包括以下文件:
npm错误/home/andre/npm-debug.log
点击此链接: 我创建了一个在linux上安装Appium的分步过程

点击以下链接: 我创建了一个在linux上安装Appium的分步过程


找到了问题。因为我在企业网络中,所以我支持代理。所以我无法使用git

使用下面的命令,我可以使用https而不是http克隆文件夹

git config --global url."https://github.com/".insteadOf git@github.com:
git config --global url."https://".insteadOf git://

发现了问题。因为我在企业网络中,所以我支持代理。所以我无法使用git

使用下面的命令,我可以使用https而不是http克隆文件夹

git config --global url."https://github.com/".insteadOf git@github.com:
git config --global url."https://".insteadOf git://

你好,奎师那,谢谢你的回答!不幸的是,我以前也遇到过同样的问题。你好,奎师那,谢谢你的回答!不幸的是,我以前也遇到过同样的问题。