0

ツールをインストールしようとしていますが、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

config.status の最初の 35 行は次のとおりです。

#! /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

誰でもこれで私を助けることができますか?前もって感謝します

4

1 に答える 1

2

構成ファイルを DOS (Windows) マシンからダウンロードし、CRLF 行末を使用していると思います。エラー メッセージは行番号を伝えようとしていますが、CR は出力を混乱させています。たとえば、次のようになります。

: command not foundne 6:

本当に次のようなものです:

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

CR はキャリッジ リターンです。

テキストモードの FTP (または CRLF の行末を改行 (LF のみ) の末尾に変換する何か) を使用せずにすべてをコピーした場合は、転送をやり直すのが最も簡単かもしれません。ファイルから取り出したtarときに間違ったモードだった場合は、おそらくすべてを翻訳する必要があります。インストールできるツールがありdos2unixdtouDOS から Unix への変換に役立ちます。

Configure スクリプトだけの場合は、 を使用vimしてファイルを編集し、次を使用できます。

:set fileformat=unix

行末を変更してファイルを強制保存する

于 2012-07-23T19:40:38.027 に答える