java - TeamCity 服务器找不到 java (ubuntu)

标签 java ubuntu teamcity

Ubuntu 18.04

sudo ./teamcity-server.sh 运行

Java executable of version 1.8 is not found:
- Java executable is not found under the specified directories: '', '/home/alex/TeamCity/bin/../jre'
- Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
- Java executable is not found in the default locations
- Java executable is not found in the directories listed in the PATH environment variable

Please make sure either JAVA_HOME or JRE_HOME environment variable is defined and is pointing to the root directory of the valid Java (JRE) installation

Environment variable FJ_DEBUG can be set to enable debug output

Java not found. Cannot start TeamCity server. Please ensure JDK or JRE is installed and JAVA_HOME environment variable points to it.

java版本
openjdk version "10.0.2" 2018-07-17
OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4)
OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4, mixed mode)
alex@teamcity-server:~/TeamCity/bin$

$JAVA_HOME(尝试过 default-java,/bin)
-bash: /usr/lib/jvm/java-11-openjdk-amd64: Is a directory

$JRE_HOME(尝试过 default-java,/bin)
-bash: /usr/lib/jvm/java-11-openjdk-amd64: Is a directory

回声 $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/bin:/usr/bin:/sbin:/usr/games:/usr/local/games:/usr/lib/jvm/java-11-openjdk-amd64/bin

readlink -f $(哪个java)
/usr/lib/jvm/java-11-openjdk-amd64/bin/java

试过了
ln -s /usr/lib/jvm/java-11-openjdk-amd64/bin /home/alex/TeamCity/jre

它是否需要特定的 java 版本并且不适用于最新版本?

我是否错误地设置了变量?

最佳答案

我猜,TeamCity 期待 Java 1.8

Java executable of version 1.8 is not found.



但是你用 Java 10 喂它

openjdk version "10.0.2"



我认为答案

Is it requires SPECIFIC java version and does not work with latest?



是“是。”,它可能只需要 Java 1.8。

关于java - TeamCity 服务器找不到 java (ubuntu),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54720849/

相关文章:

linux - 用反斜杠空格替换 QString 中的空格

c - `clear` 导致 undefined reference 错误

svn - 设置 JetBrains YouTrack 以连接到 SVN

在命令行构建步骤中,TeamCity与%符号发生冲突

java - 类型安全地创建要传递给 Comparator.comparing() 的 Function 实例

java - 使用 Java 逐层构建树

java - 如何从 Oracle 数据库中获取自动递增的 PK?

java - 如何从 Linux 运行 selenium webdriver(目前在 Windows 中工作)?

docker - 与 Portainer : "resource is online but isn' t responding to connection attempts"连接

continuous-integration - 在 Team City 构建期间复制文件