- 环境:centos7、java11
- 安装版本 mirai-2.15.0-dev-105
- build成功但执行start脚本报错
- log如下,谢谢大佬解答
[root@VM-0-11-centos Lapis-main]# ./setup.sh
在运行本程序之前, 请确保你已经安装 java.
请在下方输入版本号并回车以下载开发版本.
开发版本的版本号可以在以下链接中获取:
https://repo.mirai.mamoe.net/snapshots/net/mamoe/mirai-core
输入版本号: 2.15.0-dev-105
注: 其中一个库下载耗时较长,请耐心等待
Downloading https://services.gradle.org/distributions/gradle-7.5.1-bin.zip
...........10%............20%...........30%............40%...........50%............60%...........70%............80%...........90%............100%
Welcome to Gradle 7.5.1!
Here are the highlights of this release:
- Support for Java 18
- Support for building with Groovy 4
- Much more responsive continuous builds
- Improved diagnostics for dependency resolution
For more details see https://docs.gradle.org/7.5.1/release-notes.html
Starting a Gradle Daemon (subsequent builds will be faster)
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD SUCCESSFUL in 1m 17s
4 actionable tasks: 3 executed, 1 up-to-date
若提示 BUILD SUCCESSFUL, 一键包已成功打包到 ./build/lapis 文件夹中.
若提示 BUILD FAILED, 可能是版本号输入错误或者网络问题.
[root@VM-0-11-centos Lapis-main]# ./mirai/Start.Server.sh
-bash: ./mirai/Start.Server.sh: No such file or directory
[root@VM-0-11-centos Lapis-main]# ./build/mirai/Start.Server.sh
Error: Could not find or load main class net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader
Caused by: java.lang.ClassNotFoundException: net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader
[root@VM-0-11-centos Lapis-main]# java -version
openjdk version "11.0.16" 2022-07-19 LTS
OpenJDK Runtime Environment (Red_Hat-11.0.16.0.8-1.el7_9) (build 11.0.16+8-LTS)
OpenJDK 64-Bit Server VM (Red_Hat-11.0.16.0.8-1.el7_9) (build 11.0.16+8-LTS, mixed mode, sharing)
[root@VM-0-11-centos Lapis-main]# ./build/mirai/Start.Server.sh
Error: Could not find or load main class net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader
Caused by: java.lang.ClassNotFoundException: net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader
[root@VM-0-11-centos Lapis-main]# ./build/mirai/Start.Server.cmd
./build/mirai/Start.Server.cmd: line 1: @echo: command not found
./build/mirai/Start.Server.cmd: line 2: setLocal: command not found
./build/mirai/Start.Server.cmd: line 3: title: command not found
./build/mirai/Start.Server.cmd: line 8: fg: no job control
./build/mirai/Start.Server.cmd: line 11: syntax error near unexpected token (' ./build/mirai/Start.Server.cmd: line 11:
if %EL% NEQ 0 ('
[root@VM-0-11-centos Lapis-main]# ./build/mirai/Start.Server.sh
Error: Could not find or load main class net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader
Caused by: java.lang.ClassNotFoundException: net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader