报错如下,请问大佬们这个要如何解决
[OHOS INFO] [67137/81830] STAMP obj/base/security/selinux_adapter/libpcre2_toolchain.stamp
[OHOS INFO] [67138/81830] ACTION //applications/standard/dlp_manager:dlp_manager_compile_app(//build/toolchain/ohos:ohos_clang_arm)
[OHOS INFO] [0/0] ohpm_install_cmd:['ohpm', 'install']
[OHOS INFO] [0/0] ohpm DEBUG: start lock, pid: 294800
[OHOS INFO] [0/0]
[OHOS INFO] [0/0] project dir: /home/chenjm/project/openHarmony/5.0-release/applications/standard/dlp_manager
[OHOS INFO] [0/0] model_version: None
[OHOS INFO] [0/0] hvigor cmd: bash ./hvigorw assembleHap --mode module -p product=default -p module=entry -p debuggable=false -p buildMode=release --no-daemon
[OHOS INFO] [0/0] Hvigor clean start
[OHOS INFO] [0/0] Hvigor build start
[OHOS INFO] [2/2] Hvigor warning: > hvigor ERROR: Invalid value of 'sdk.dir' in 'local.properties' or 'OHOS_BASE_SDK_HOME' in the system environment path.
[OHOS INFO] [2/2] Hvigor warning: at /home/chenjm/project/openHarmony/5.0-release/prebuilts/ohos-sdk/linux
[OHOS INFO] [2/2] Hvigor warning: > hvigor ERROR: BUILD FAILED in 620 ms
[OHOS INFO] [67139/81830] ACTION //applications/standard/permission_manager:permission_manager_compile_app(//build/toolchain/ohos:ohos_clang_arm)
[OHOS INFO] [0/0] ohpm_install_cmd:['ohpm', 'install']
[OHOS INFO] [0/0] ohpm DEBUG: start lock, pid: 294803
[OHOS INFO] [0/0]
[OHOS INFO] [0/0] project dir: /home/chenjm/project/openHarmony/5.0-release/applications/standard/permission_manager
[OHOS INFO] [0/0] model_version: None
[OHOS INFO] [0/0] hvigor cmd: bash ./hvigorw assembleHap --mode module -p product=default -p module=permissionmanager -p debuggable=false -p buildMode=release --no-daemon
[OHOS INFO] [0/0] Hvigor clean start
[OHOS INFO] [0/0] Hvigor build start
[OHOS INFO] [2/2] Hvigor warning: > hvigor ERROR: Invalid value of 'sdk.dir' in 'local.properties' or 'OHOS_BASE_SDK_HOME' in the system environment path.
[OHOS INFO] [2/2] Hvigor warning: at /home/chenjm/project/openHarmony/5.0-release/prebuilts/ohos-sdk/linux
[OHOS INFO] [2/2] Hvigor warning: > hvigor ERROR: BUILD FAILED in 665 ms
[OHOS INFO] [67140/81830] SOLINK clang_x64/thirdparty/icu/libhmicui18n.so
[OHOS INFO] end hpm command
[OHOS ERROR] [67138/81830] ACTION //applications/standard/dlp_manager:dlp_manager_compile_app(//build/toolchain/ohos:ohos_clang_arm)
[OHOS ERROR] FAILED: obj/applications/standard/dlp_manager/dlp_manager/unsigned_hap_path_list.json
[OHOS ERROR] /usr/bin/env ../../build/scripts/compile_app.py --nodejs ../../prebuilts/build-tools/common/nodejs/node-v16.20.2-linux-x64/bin/node --cwd ../../applications/standard/dlp_manager/ --build-profile ../../applications/standard/dlp_manager/build-profile.json5 --sdk-home /home/chenjm/project/openHarmony/5.0-release/prebuilts/ohos-sdk/linux --output-file obj/applications/standard/dlp_manager/dlp_manager/unsigned_hap_path_list.json --ohpm-registry --build-level module --assemble-type assembleHap --sdk-type-name sdk.dir --build-modules entry --hvigor-obfuscation
[OHOS ERROR] build_profile:../../applications/standard/dlp_manager/build-profile.json5; cwd:/home/chenjm/project/openHarmony/5.0-release/applications/standard/dlp_manager
[OHOS ERROR] modules_list:[{'name': 'entry', 'srcPath': './entry', 'targets': [{'name': 'default', 'applyToProducts': ['default']}]}]
[OHOS ERROR] [67139/81830] ACTION //applications/standard/permission_manager:permission_manager_compile_app(//build/toolchain/ohos:ohos_clang_arm)
[OHOS ERROR] FAILED: obj/applications/standard/permission_manager/permission_manager/unsigned_hap_path_list.json
[OHOS ERROR] /usr/bin/env ../../build/scripts/compile_app.py --nodejs ../../prebuilts/build-tools/common/nodejs/node-v16.20.2-linux-x64/bin/node --cwd ../../applications/standard/permission_manager/ --build-profile ../../applications/standard/permission_manager/build-profile.json5 --sdk-home /home/chenjm/project/openHarmony/5.0-release/prebuilts/ohos-sdk/linux --output-file obj/applications/standard/permission_manager/permission_manager/unsigned_hap_path_list.json --ohpm-registry --build-level module --assemble-type assembleHap --sdk-type-name sdk.dir --build-modules permissionmanager --hvigor-obfuscation
[OHOS ERROR] build_profile:../../applications/standard/permission_manager/build-profile.json5; cwd:/home/chenjm/project/openHarmony/5.0-release/applications/standard/permission_manager
[OHOS ERROR] modules_list:[{'name': 'entry', 'srcPath': './entry', 'targets': [{'name': 'default', 'applyToProducts': ['default']}]}, {'name': 'permissionmanager', 'srcPath': './permissionmanager', 'targets': [{'name': 'default', 'applyToProducts': ['default']}]}]
[OHOS ERROR] Traceback (most recent call last):
[OHOS ERROR] File "/home/chenjm/project/openHarmony/5.0-release/build/hb/containers/status.py", line 47, in wrapper
[OHOS ERROR] return func(*args, **kwargs)
[OHOS ERROR] ^^^^^^^^^^^^^^^^^^^^^
[OHOS ERROR] File "/home/chenjm/project/openHarmony/5.0-release/build/hb/modules/ohos_build_module.py", line 67, in run
[OHOS ERROR] raise exception
[OHOS ERROR] File "/home/chenjm/project/openHarmony/5.0-release/build/hb/modules/ohos_build_module.py", line 65, in run
[OHOS ERROR] super().run()
[OHOS ERROR] File "/home/chenjm/project/openHarmony/5.0-release/build/hb/modules/interface/build_module_interface.py", line 70, in run
[OHOS ERROR] raise exception
[OHOS ERROR] File "/home/chenjm/project/openHarmony/5.0-release/build/hb/modules/interface/build_module_interface.py", line 68, in run
[OHOS ERROR] self._ninja()
[OHOS ERROR] File "/home/chenjm/project/openHarmony/5.0-release/build/hb/util/timer_util.py", line 30, in inner
[OHOS ERROR] res = func(*arg, **kwarg)
[OHOS ERROR] ^^^^^^^^^^^^^^^^^^^
[OHOS ERROR] File "/home/chenjm/project/openHarmony/5.0-release/build/hb/modules/interface/build_module_interface.py", line 125, in _ninja
[OHOS ERROR] self._target_compilation()
[OHOS ERROR] File "/home/chenjm/project/openHarmony/5.0-release/build/hb/modules/ohos_build_module.py", line 102, in _target_compilation
[OHOS ERROR] self.target_compiler.run()
[OHOS ERROR] File "/home/chenjm/project/openHarmony/5.0-release/build/hb/services/ninja.py", line 38, in run
[OHOS ERROR] self._execute_ninja_cmd()
[OHOS ERROR] File "/home/chenjm/project/openHarmony/5.0-release/build/hb/services/ninja.py", line 69, in _execute_ninja_cmd
[OHOS ERROR] SystemUtil.exec_command(
[OHOS ERROR] File "/home/chenjm/project/openHarmony/5.0-release/build/hb/util/system_util.py", line 75, in exec_command
[OHOS ERROR] LogUtil.get_failed_log(log_path)
[OHOS ERROR] File "/home/chenjm/project/openHarmony/5.0-release/build/hb/util/log_util.py", line 193, in get_failed_log
[OHOS ERROR] LogUtil.get_compiler_failed_log(log_path)
[OHOS ERROR] File "/home/chenjm/project/openHarmony/5.0-release/build/hb/util/log_util.py", line 180, in get_compiler_failed_log
[OHOS ERROR] raise OHOSException(
[OHOS ERROR] exceptions.ohos_exception.OHOSException: COMPILE Failed! Please check error in /home/chenjm/project/openHarmony/5.0-release/out/rk3568/error.log, and for more build information in /home/chenjm/project/openHarmony/5.0-release/out/rk3568/build.log
[OHOS ERROR]
[OHOS ERROR] Code: 4000
[OHOS ERROR]
[OHOS ERROR] Reason: COMPILE Failed! Please check error in /home/chenjm/project/openHarmony/5.0-release/out/rk3568/error.log, and for more build information in /home/chenjm/project/openHarmony/5.0-release/out/rk3568/build.log
[OHOS ERROR]
[OHOS ERROR] Error Type: Ninja build error
[OHOS ERROR]
[OHOS ERROR] Description: An unknown error occurred while executing 'ninja -C'.
[OHOS ERROR]
[OHOS ERROR] Solution: no solution
[OHOS ERROR]
=====build error=====
ohos sdk没有正常安装导致
这个错误表明在构建过程中,hvigor工具无法找到有效的SDK路径: local.properties文件中的sdk.dir配置错误: OpenHarmony项目根目录下的applications/standard/dlp_manager和applications/standard/permission_manager目录中,应该有一个local.properties文件。 检查该文件中的sdk.dir属性是否指向了正确的SDK路径。根据日志,它指向/home/chenjm/project/openHarmony/5.0-release/prebuilts/ohos-sdk/linux,路径是正确的,但该目录下没有有效的SDK内容。 环境变量OHOS_BASE_SDK_HOME未设置或设置错误: 检查您的系统环境变量中是否设置了OHOS_BASE_SDK_HOME,并且它是否指向了正确的SDK路径。 您可以通过在终端运行echo $OHOS_BASE_SDK_HOME来检查这个环境变量的值。