gpt4 book ai didi

linux - 'make' 期间 config.status 错误

转载 作者:太空宇宙 更新时间:2023-11-04 09:50:37 25 4
gpt4 key购买 nike

我正在尝试安装一个工具,当我进行 make 时,我在 config.status 文件中收到错误消息,如下所示:

 /bin/sh ./config.status
: command not foundne 6:
: command not foundne 10:
': not a valid identifier export: `SHELL
: command not foundne 16:
./config.status: line 31: syntax error near unexpected token `newline'
'/config.status: line 31: ` ;;
make[1]: *** [Makefile] Error 2

我的前 35 行 config.status 如下:

#! /bin/sh
# Generated by configure.
# Run this file to recreate the current configuration.
# Compiler output produced by configure, useful for debugging
# configure, is in config.log if it exists.

debug=false
ac_cs_recheck=false
ac_cs_silent=false

SHELL=${CONFIG_SHELL-bin/sh}
export SHELL
## -------------------- ##
## M4sh Initialization. ##
## -------------------- ##

# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
else
case `(set -o) 2>/dev/null` in #(
*posix*) :
set -o posix ;; #(
*) :
;;
esac
fi

有人可以帮我解决这个问题吗?提前致谢

最佳答案

我想您是从 DOS (Windows) 机器上下载配置文件的,并且有 CRLF 行结尾。错误消息试图告诉您有关行号的信息,但 CR 混淆了输出。所以,例如:

: command not foundne 6:

真的是这样的:

./configure xxxx line 6: CR
: command not found

其中CR为回车。

如果您在没有使用文本模式 FTP(或其他将 CRLF 行结尾转换为换行符(仅 LF)结尾的东西)的情况下复制了所有内容,那么重做传输可能是最简单的方法。如果您将它从 tar 文件中提取出来并且它处于错误的模式,那么您可能必须翻译所有内容。有一些工具(dos2unixdtou 仅举两个例子)可以安装并且可以帮助 DOS 到 Unix 的转换。

如果只是Configure脚本,可以使用vim编辑文件,使用:

:set fileformat=unix

改变行尾,然后强制保存文件

关于linux - 'make' 期间 config.status 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11619159/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com