目前共有3篇帖子。 字體大小:較小 - 100% (默認)▼  內容轉換:不轉換▼
 
點擊 回復
20 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)
 

本帖信息

點擊數:20 回複數:2
評論數: ?
作者:巨大八爪鱼
最後回復:巨大八爪鱼
最後回復時間:2026-6-3 20:09
 
©2010-2026 Purasbar Ver2.0
除非另有聲明,本站採用創用CC姓名標示-相同方式分享 3.0 Unported許可協議進行許可。