我正在尝试安装工具,当我做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
有人可以帮我这个吗? 提前致谢
答案 0 :(得分:2)
我认为您从DOS(Windows)计算机下载了配置文件并具有CRLF行结尾。错误消息试图告诉您有关行号的信息,但CR会使输出混乱。所以,例如:
: command not foundne 6:
真的是这样的:
./configure xxxx line 6: CR
: command not found
其中CR是回车。
如果您在不使用文本模式FTP(或其他将CRLF行结尾转换为换行符(仅限LF)结尾)的情况下复制了所有内容,那么重做传输可能最简单。如果你从tar
文件中取出它并且它处于错误模式,那么你可能需要翻译所有内容。有一些工具(dos2unix
和dtou
可以命名,但有两个)可以安装,可能有助于DOS到Unix的翻译。
如果只是配置脚本,您可以使用vim
编辑文件,并使用:
:set fileformat=unix
更改行结尾,然后强行保存文件