xmake-io / xrepo

🗂️ A cross-platform C/C++ package manager based on Xmake
https://xrepo.xmake.io
Apache License 2.0
361 stars 16 forks source link

add-repo 命令找不到 unzip 和 7z #49

Closed oxc-v closed 4 months ago

oxc-v commented 4 months ago

Xmake 版本

2.9.3

操作系统版本和架构

Rocky-Linux-9

描述问题

执行 xrepo add-repo oxc xxx 时报错

image image

期待的结果

命令执行成功

工程配置

附加信息和错误日志

[root@10-16-153-4 ~]# xrepo add-repo -vD oxc xxx /root/.local/bin/xmake repo --add --global -v -D oxc xxx error: @programdir/core/main.lua:329: ...mdir/modules/private/action/require/impl/environment.lua:37: failed to find unzip or 7zip! please install one of them first stack traceback: [C]: in function 'error' [@programdir/core/base/os.lua:973]: [...mdir/modules/private/action/require/impl/environment.lua:37]: in function 'enter' [@programdir/plugins/repo/main.lua:50]: in function '_add' [@programdir/plugins/repo/main.lua:231]: [C]: in function 'xpcall' [@programdir/core/base/utils.lua:275]: [@programdir/core/base/task.lua:491]: in function 'run' [@programdir/core/main.lua:327]: in function 'cotask' [@programdir/core/base/scheduler.lua:406]:

stack traceback: [C]: in function 'error' @programdir/core/base/os.lua:973: in function 'os.raiselevel' (...tail calls...) @programdir/core/main.lua:329: in upvalue 'cotask' @programdir/core/base/scheduler.lua:406: in function <@programdir/core/base/scheduler.lua:399> error: ./.local/share/xmake/core/main.lua:329: ./.local/share/xmake/core/sandbox/modules/os.lua:378: execv(/root/.local/bin/xmake repo --add --global -v -D oxc xxx) failed(255) stack traceback: [C]: in function 'error' [./.local/share/xmake/core/base/os.lua:973]: [./.local/share/xmake/core/sandbox/modules/os.lua:378]: [...al/share/xmake/modules/private/xrepo/action/add-repo.lua:80]: in function '_add_repository' [...al/share/xmake/modules/private/xrepo/action/add-repo.lua:88]: [./.local/share/xmake/modules/private/xrepo/main.lua:196]: [./.local/share/xmake/plugins/lua/main.lua:124]: [C]: in function 'xpcall' [./.local/share/xmake/core/base/utils.lua:275]: [./.local/share/xmake/core/base/task.lua:491]: in function 'run' [./.local/share/xmake/core/main.lua:327]: in function 'cotask' [./.local/share/xmake/core/base/scheduler.lua:406]:

stack traceback: [C]: in function 'error' ./.local/share/xmake/core/base/os.lua:973: in function 'os.raiselevel' (...tail calls...) ./.local/share/xmake/core/main.lua:329: in upvalue 'cotask' ./.local/share/xmake/core/base/scheduler.lua:406: in function <./.local/share/xmake/core/base/scheduler.lua:399>

waruqi commented 4 months ago

不对 root 做支持,请先切到非 root 用户。

oxc-v commented 4 months ago

环境问题,已解决