You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

WSL外部执行脚本失败问题求助

WSL外部执行脚本失败问题求助

大家好,我碰到了一个WSL相关的问题,想请教下各位大佬帮忙分析下。

我在WSL的Ubuntu环境里写了一个简单的脚本bash_test_01.sh,内容很简单:

echo "cmd is executed"

当我进入WSL内部运行这个脚本时一切正常:

wsl
$ cd /home
$ /home/bash_test_01.sh
cmd is executed.

但如果直接在Windows终端里用WSL命令外部调用这个脚本,就会报错。我执行的命令是:

wsl  -e /home/bash_test_01.sh

报错信息如下:

WSL (31608) ERROR: CreateProcessEntryCommon:570: execvpe /home/adm_difolco_e/bash_test_01.sh failed 8
WSL (31608) ERROR: CreateProcessEntryCommon:579: Create process not expected to return

有没有朋友遇到过类似的情况?或者能帮我找找问题出在哪吗?

备注:内容来源于stack exchange,提问作者Eliseo Di Folco

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.21 12:33:16