HarmonyOS 鸿蒙Next hm 3.1编译样例ipcamera_hispark_taurus_linux时出错 FileExistsError: [Errno 17] File exists: 'toybox' -> 'bin/chmod'
HarmonyOS 鸿蒙Next hm 3.1编译样例ipcamera_hispark_taurus_linux时出错 FileExistsError: [Errno 17] File exists: ‘toybox’ -> ‘bin/chmod’
[OHOS INFO] args: Namespace(build_platform_name='phone', build_xts=False, example_subsystem_file=None, gn_root_out_dir='/home/ubuntu204/Desktop/hm3.1code/out/hispark_taurus/ipcamera_hispark_taurus_linux', ignore_api_check=['xts', 'common', 'developertest'], os_level='small', platforms_config_file='/home/ubuntu204/Desktop/hm3.1code/out/preloader/ipcamera_hispark_taurus_linux/platforms.build', scalable_build=False, source_root_dir='/home/ubuntu204/Desktop/hm3.1code/', subsystem_config_file='/home/ubuntu204/Desktop/hm3.1code/out/preloader/ipcamera_hispark_taurus_linux/subsystem_config.json', target_cpu='arm', target_os='ohos')
[OHOS INFO] build configs generation is complete.
[OHOS INFO] ohos_build_compiler: clang
[OHOS INFO] ohos_kernel_type: linux
[OHOS INFO] hks_config_small.h
[OHOS INFO] histreamer plugin config:multimedia_histreamer_enable_plugin_ffmpeg_adapter = true
[OHOS INFO] histreamer plugin config:multimedia_histreamer_enable_plugin_hdi_adapter = true
[OHOS INFO] histreamer plugin config:multimedia_histreamer_enable_plugin_file_source = true
[OHOS INFO] histreamer plugin config:multimedia_histreamer_enable_plugin_stream_source = false
[OHOS INFO] histreamer plugin config:multimedia_histreamer_enable_plugin_audio_server_sink = false
[OHOS INFO] histreamer audio encoder plugin only supports standard system
[OHOS INFO] histreamer ffmpeg muxer plugin only supports standard system
[OHOS INFO] ERROR at //third_party/toybox/BUILD.gn:448:3: Script returned non-zero exit code.
[OHOS INFO] exec_script("install.py",
[OHOS INFO] ^----------
[OHOS INFO] Current dir: /home/ubuntu204/Desktop/hm3.1code/out/hispark_taurus/ipcamera_hispark_taurus_linux/
[OHOS INFO] Command: /usr/bin/python3 /home/ubuntu204/Desktop/hm3.1code/third_party/toybox/install.py --long_path bin/chmod --out_dir /home/ubuntu204/Desktop/hm3.1code/out/hispark_taurus/ipcamera_hispark_taurus_linux
[OHOS INFO] Returned 1.
[OHOS INFO] stderr:
[OHOS INFO] Traceback (most recent call last):
[OHOS INFO] File "/home/ubuntu204/Desktop/hm3.1code/third_party/toybox/install.py", line 63, in <module>
[OHOS INFO] sys.exit(main())
[OHOS INFO] File "/home/ubuntu204/Desktop/hm3.1code/third_party/toybox/install.py", line 57, in main
[OHOS INFO] os.symlink("toybox", target_link)
[OHOS INFO] FileExistsError: [Errno 17] File exists: 'toybox' -> 'bin/chmod'
[OHOS INFO] See //base/startup/init_lite/services/BUILD.gn:92:9: which caused the file to be included.
[OHOS INFO] "//third_party/toybox",
[OHOS INFO] ---------------------------------------------
[OHOS INFO] ccache summary:
[OHOS INFO] cache hit (direct) : 0
[OHOS INFO] cache hit (preprocessed) : 0
[OHOS INFO] cache miss : 0
[OHOS INFO] hit rate: 0.00%
[OHOS INFO] mis rate: 0.00%
[OHOS INFO] ---------------------------------------------
更多关于HarmonyOS 鸿蒙Next hm 3.1编译样例ipcamera_hispark_taurus_linux时出错 FileExistsError: [Errno 17] File exists: 'toybox' -> 'bin/chmod'的实战教程也可以访问 https://www.itying.com/category-93-b0.html
3.1beta包不是那么稳定?
1)之前用HDF在某个目录增加了一个没有使用的默认C语言驱动文件,现在移除了.
2)重新build还是卡住,然后点击rebuild,就成功了:
更多关于HarmonyOS 鸿蒙Next hm 3.1编译样例ipcamera_hispark_taurus_linux时出错 FileExistsError: [Errno 17] File exists: 'toybox' -> 'bin/chmod'的实战系列教程也可以访问 https://www.itying.com/category-93-b0.html
文件//base/startup/init_lite/services/BUILD.gn删除92这一行"//third_party/toybox"之后,再build,一直在转圈,按照HM网站的样例提示,需要4个小时编译吗?
针对帖子标题中提到的问题,即在编译HarmonyOS鸿蒙Next hm 3.1样例ipcamera_hispark_taurus_linux时遇到FileExistsError: [Errno 17] File exists: 'toybox' -> 'bin/chmod'
错误,这通常是因为在编译过程中,某个文件或目录已被创建,但编译脚本试图再次创建相同的文件或目录导致的。
解决此问题的方法可能包括:
-
清理编译环境:确保在重新编译前彻底清理之前的编译产物。可以尝试删除整个编译输出目录(如
out
目录),然后重新运行编译命令。 -
检查并行编译:如果你在使用并行编译(如使用
make -j
),尝试减少并行度或禁用并行编译,看是否仍然出现该错误。 -
检查文件系统:确认文件系统没有损坏,且有足够的空间进行编译操作。
-
手动解决冲突:如果错误指向特定文件(如本例中的
bin/chmod
),可以手动检查该文件是否存在,以及是否有权限问题导致编译脚本无法正确覆盖或处理该文件。
如果上述方法仍然无法解决你的问题,可能是编译脚本或环境配置存在特定问题。此时,请直接联系官网客服以获取更专业的帮助。官网地址是:https://www.itying.com/category-93-b0.html