最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【未解决】gow下,运行命令时出错:rm: cannot lstat xxx: Invalid argument

Gow crifan 3707浏览 0评论

【问题】

折腾gow的过程中,运行了命令make html去测试能否正常编译docbook,结果命令出错:

错误内容:

E:\Dev_Root\docbook\dev\books\docbook_dev_note\src>make html
"=============================== cleaning html =============================="
rm -rf ../output/html/single/*
rm: cannot lstat `../output/html/single/*': Invalid argument
make: *** [clean_html] Error 1

 

错误截图:

rm cannot lstat

【解决过程】

1. 然后尝试了其他一些写法,也还是不行:

E:\Dev_Root\docbook\dev\books\docbook_dev_note\src>where rm
E:\dev_install_root\Gow\bin\rm.exe

E:\Dev_Root\docbook\dev\books\docbook_dev_note\src>rm ../output/html/single/*
rm: cannot remove `../output/html/single/*': Invalid argument

E:\Dev_Root\docbook\dev\books\docbook_dev_note\src>rm ..\output\html\single\*
rm: cannot remove `..\\output\\html\\single\\*': Invalid argument

E:\Dev_Root\docbook\dev\books\docbook_dev_note\src>rm -rf ../output/html/single/*
rm: cannot lstat `../output/html/single/*': Invalid argument

E:\Dev_Root\docbook\dev\books\docbook_dev_note\src>rm -r ../output/html/single/*
rm: cannot lstat `../output/html/single/*': Invalid argument

E:\Dev_Root\docbook\dev\books\docbook_dev_note\src>rm -r ../output/html/single/*.*
rm: cannot lstat `../output/html/single/*.*': Invalid argument

2.网上找了半天,也没找到有啥价值的参考资料。

唯一的一个:

Unix on Windows

中解释道:

‘source configure’ gives me:

test: too many arguments
test: too many arguments
rm: cannot lstat `conftest*': Invalid argument
bash": error: cannot run /bin/sh ./support/config.sub
rm: cannot lstat `core.*': Invalid argument
rm: cannot lstat `*.core': Invalid argument

The complaints about things with * in are due to different handling of globbing on unix and Windows – a pattern which doesn’t match anything evaluates to an empty list on unix, but evaluates to the pattern on Windows. These problems can be kludged around by creating (using ‘touch’) a file which will definitely match the pattern immediately prior to the line which applies the pattern (which, in this configure script, is always ‘rm *.foo’, so this is safe). There are further problems where bash and some of the external programs it runs have different ideas about line-ending conventions. Having identified which variables are affected, clean them up with code like:

x=`echo $x | tr -d [:cntrl:]`

Fuck, can’t reproduce that; now i just get:

 or ..r: cannot find sources in configure

Another time, another time …

所以,如果按照其说的,唯一解决办法是,新建一个和上述(匹配符)同名的文件的话,那么我这里也没法在`../output/html/single路径下创建一个名为*的文件啊。

所以还是无解。

3. 想要参考:XFS problem…去试试stat,结果gow中却没有此命令:

E:\Dev_Root\docbook\dev\books\docbook_dev_note\src>stat ../output/html/single/*
'stat' 不是内部或外部命令,也不是可运行的程序
或批处理文件。

所以还是无法解决。

 

【总结】

本来以为此问题很容易解决的,结果却发现很难。所以还是算了,暂时放弃吧。

转载请注明:在路上 » 【未解决】gow下,运行命令时出错:rm: cannot lstat xxx: Invalid argument

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
84 queries in 0.194 seconds, using 21.86MB memory