【问题标题】:install selenium webdriver in debain 6.0.1 amazon EC2 instances在 debain 6.0.1 amazon EC2 实例中安装 selenium webdriver
【发布时间】:2014-05-31 01:25:36
【问题描述】:

在 Debian 中安装 selenium

http://docs.seleniumhq.org/docs/03_webdriver.jsp

我正在关注这个链接

我创建了 pom.xml 然后安装jdk和jre 然后安装 apache maven

当我尝试这个命令时

   mvn clean install

它给了我一个错误

  root@debian:/var/www/sele_webd# mvn clean install
  Error: JAVA_HOME is not defined correctly.
  We cannot execute /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.i686/bin/java

我该如何解决..

或者还有其他简单的教程可以在 debain 6.0.1 中安装 selenium webdriver

在输入此链接后,我收到了这个新错误

                    root@debian:~# mvn install
        [WARNING]
        [WARNING] Some problems were encountered while building the effective settings
        [WARNING] Unable to parse element 'port', must be an integer (position: END_TAG seen ...<port>port_number</port>... @7:31) caused by: java.lang.NumberFormatException: For input string: "port_number" @ /root/.m2/settings.xml, line 7, column 31
        [WARNING]
        [INFO] Scanning for projects...
        [INFO] ------------------------------------------------------------------------
        [INFO] BUILD FAILURE
        [INFO] ------------------------------------------------------------------------
        [INFO] Total time: 0.092 s
        [INFO] Finished at: 2014-03-25T21:11:57-07:00
        [INFO] Final Memory: 2M/15M
        [INFO] ------------------------------------------------------------------------
        [ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/root). Please verify you invoked Maven from the correct directory. -> [Help 1]
        [ERROR]
        [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
        [ERROR] Re-run Maven using the -X switch to enable full debug logging.
        [ERROR]
        [ERROR] For more information about the errors and possible solutions, please read the following articles:
        [ERROR] [Help 1] http://cwiki.apache.org/confluen

【问题讨论】:

  • 这可能是您的环境变量的问题。 JAVA_HOME 设置为什么。
  • 我如何检查它设置为我试过 echo $JAVA_HOME 但它打印一个空行

标签: java maven selenium amazon-ec2


【解决方案1】:

检查您的 JAVA_HOME 变量配置是否正确。使用 Linux 设置 Java Home 指南http://www.cyberciti.biz/faq/linux-unix-set-java_home-path-variable/

这里是关于 Amazon EC2 和 Java Home http://www.techrepublic.com/blog/the-enterprise-cloud/how-to-use-the-command-line-with-amazons-ec2-api-tools/5574/# 的链接。

【讨论】:

  • 感谢@Lt_Shade 的重播。但我使用的是 debain(linux) 操作系统
  • 我放了一个关于如何用 Linux 配置它的链接
  • 这个链接帮了我很多mshsoftware.com/site/kb/set-java-home-on-linux.html ..谢谢你的帮助
  • 但是我遇到了一些新的错误,你能帮忙解决一下错误是什么
  • 看起来您的端口号没有设置为 int 并且仍然是一个字符串。您可以尝试在代码中手动设置端口号。
猜你喜欢
  • 1970-01-01
  • 2015-04-04
  • 1970-01-01
  • 2013-09-05
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-06-26
相关资源
最近更新 更多