批处理之家's Archiver

netdzb 发表于 2019-7-9 18:29

怎么调试SHELL脚本

下了一份源代码,./configure的时候,最后出了2个错误,无法编译代码了。
应该怎么查看问题出在哪一行上面呢?

Batcher 发表于 2019-7-10 11:48

确认源代码是shell脚本吗,会不会是C语言呢?

netdzb 发表于 2019-7-10 12:16

[b]回复 [url=http://www.bathome.net/redirect.php?goto=findpost&pid=221774&ptid=53297]2#[/url] [i]Batcher[/i] [/b]

确定是的。
configure配置makefile文件用的。

codegay 发表于 2019-7-10 15:06

参考一下提问的智慧,问问题必须给出具体信息,比如错误的警告信息,以及有问题的代码部分。

Batcher 发表于 2019-7-10 15:46

[b]回复 [url=http://bbs.bathome.net/redirect.php?goto=findpost&pid=221775&ptid=53297]3#[/url] [i]netdzb[/i] [/b]


    源代码从哪里下载的?我也想看看什么样的shell脚本需要configure、make、make install

netdzb 发表于 2019-7-10 16:21

[b]回复 [url=http://www.bathome.net/redirect.php?goto=findpost&pid=221777&ptid=53297]5#[/url] [i]Batcher[/i] [/b]

好的,一会我传到百度上面。我是windows xp下的msys 1.0的系统,所以无法编译出来。

netdzb 发表于 2019-7-10 16:25

[b]回复 [url=http://www.bathome.net/redirect.php?goto=findpost&pid=221777&ptid=53297]5#[/url] [i]Batcher[/i] [/b]

能否编译出适合xp运行的base64,论坛的base64的工具也是近20年前了。
这个应该比较新的。

链接:[url]https://pan.baidu.com/s/17IR3FfHMC_ITkyatgXgDMg[/url]
提取码:h25w
复制这段内容后打开百度网盘手机App,操作更方便哦

Batcher 发表于 2019-7-12 11:18

[b]回复 [url=http://bbs.bathome.net/redirect.php?goto=findpost&pid=221780&ptid=53297]7#[/url] [i]netdzb[/i] [/b]


    coreutils-8.13.tar.xz.zip 里面是C代码呀,你为什么说它是shell脚本呢?

netdzb 发表于 2019-7-12 12:48

[b]回复 [url=http://www.bathome.net/redirect.php?goto=findpost&pid=221837&ptid=53297]8#[/url] [i]Batcher[/i] [/b]

主目录不是有个configure配置文件,那个sh脚本,我跑不通。

Batcher 发表于 2019-7-12 14:19

[b]回复 [url=http://bbs.bathome.net/redirect.php?goto=findpost&pid=221839&ptid=53297]9#[/url] [i]netdzb[/i] [/b]


    那肯定不是shell脚本的问题,而是你的环境问题。找个真正的Linux系统试试吧。

Batcher 发表于 2019-7-12 14:23

[b]回复 [url=http://bbs.bathome.net/redirect.php?goto=findpost&pid=221764&ptid=53297]1#[/url] [i]netdzb[/i] [/b][code]bash -vx configure[/code]这是普通的shell脚本调试方法,可以看到哪行代码在报错。
但这无法解决你的问题。

页: [1]

Powered by Discuz! Archiver 7.2  © 2001-2009 Comsenz Inc.