目前共有3篇帖子。 字体大小:较小 - 100% (默认)▼  内容转换:不转换▼
 
点击 回复
18 2
sessionRelationalIT.cpp: Unable to find clang-format on path
一派掌门 二十级
1楼 发表于:2026-6-3 18:17
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  34.129 s
[INFO] Finished at: 2026-06-03T17:30:35+08:00
[INFO] ------------------------------------------------------------------------
[INFO] 66 goals, 60 executed, 6 from cache, saving at least 1s
[INFO] Build cache (/home/oct1158/.m2/.develocity/build-cache/v1) removing files not accessed on or after Wed May 27 17:30:35 CST 2026.
[INFO] Build cache (/home/oct1158/.m2/.develocity/build-cache/v1) cleanup deleted 0 files/directories.
[INFO] Build cache (/home/oct1158/.m2/.develocity/build-cache/v1) cleaned up in 0.023 secs.
[ERROR] Failed to execute goal com.diffplug.spotless:spotless-maven-plugin:2.44.5:check (spotless-check) on project client-cpp: Unable to check file /home/oct1158/Documents/Code/C/iotdb/iotdb-cpp/iotdb-client/client-cpp/src/test/cpp/sessionRelationalIT.cpp: Unable to find clang-format on path
[ERROR] You can download clang-format from https://releases.llvm.org and then point Spotless to it with {@code pathToExe('/path/to/clang-format')} or you can use your platform's package manager:
[ERROR]   win:   choco install llvm --version 17.0.6  (try dropping version if it fails)
[ERROR]   mac:   brew install clang-format (TODO: how to specify version?)
[ERROR]   linux: apt install clang-format  (try clang-format-17.0.6 with dropped minor versions)
[ERROR]     github issue to handle this better: https://github.com/diffplug/spotless/issues/673
[ERROR] > arguments: [sh, -c, which clang-format]
[ERROR] > exit code: 1
[ERROR] >    stdout: (empty)
[ERROR] -> [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/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :client-cpp
一派掌门 二十级
2楼 发表于:2026-6-3 18:18
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  17.698 s
[INFO] Finished at: 2026-06-03T17:32:23+08:00
[INFO] ------------------------------------------------------------------------
[INFO] 66 goals, 59 executed, 7 from cache, saving at least 6s
[ERROR] Failed to execute goal com.diffplug.spotless:spotless-maven-plugin:2.44.5:check (spotless-check) on project client-cpp: Unable to check file /home/oct1158/Documents/Code/C/iotdb/iotdb-cpp/iotdb-client/client-cpp/src/test/cpp/sessionRelationalIT.cpp: You specified version 17.0.6, but Spotless found 14.0.0-1ubuntu1.1
[ERROR] You can tell Spotless to use the version you already have with {@code clangFormat('14.0.0-1ubuntu1.1')}or you can download the currently specified version, 17.0.6.
[ERROR] You can download clang-format from https://releases.llvm.org and then point Spotless to it with {@code pathToExe('/path/to/clang-format')} or you can use your platform's package manager:
[ERROR]   win:   choco install llvm --version 17.0.6  (try dropping version if it fails)
[ERROR]   mac:   brew install clang-format (TODO: how to specify version?)
[ERROR]   linux: apt install clang-format  (try clang-format-17.0.6 with dropped minor versions)
[ERROR]     github issue to handle this better: https://github.com/diffplug/spotless/issues/673
[ERROR] > arguments: [/usr/bin/clang-format, --version]
[ERROR] > exit code: 0
[ERROR] >    stdout: Ubuntu clang-format version 14.0.0-1ubuntu1.1
[ERROR] -> [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/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :client-cpp
 
一派掌门 二十级
3楼 发表于:2026-6-3 20:09

解决办法:安装clang-format-17。

wget https://apt.llvm.org/llvm.sh

chmod +x llvm.sh
sudo ./llvm.sh 17
sudo apt install clang-format-17
 

回复帖子

内容:
用户名: 您目前是匿名发表
验证码:
(快捷键:Ctrl+Enter)
 

本帖信息

点击数:18 回复数:2
评论数: ?
作者:巨大八爪鱼
最后回复:巨大八爪鱼
最后回复时间:2026-6-3 20:09
 
©2010-2026 Purasbar Ver2.0
除非另有声明,本站采用知识共享署名-相同方式共享 3.0 Unported许可协议进行许可。