Python 3.4.3コンパイルエラー

Python 3.4.3コンパイルエラー

ソースからPython 3.4.3を更新しようとしましたが、./configureコマンドが実行されるたびにconfigure.statusでエラーが発生します。

> configure: checking for device files checking for /dev/ptmx... yes
> checking for /dev/ptc... no checking for %lld and %llu printf() format
> support... yes checking for %zd printf() format support... yes
> checking for socklen_t... yes checking for broken mbstowcs... no
> checking for --with-computed-gotos... no value specified checking
> whether gcc -pthread supports computed gotos... yes checking for build
> directories... done checking for -O2... yes checking for glibc
> _FORTIFY_SOURCE/memmove bug... no checking for gcc ipa-pure-const bug... no checking for ensurepip... upgrade configure: creating
> ./config.status ./config.status: line 480: syntax error near
> unexpected token `)' ./config.status: line 480: `    *\'*)
> ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;'

これは設定ファイルを貼り付けたものです。

     # Handling of the options.
  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
    ac_cs_recheck=: ;;
  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
    $as_echo "$ac_cs_version"; exit ;;
  --config | --confi | --conf | --con | --co | --c )
    $as_echo "$ac_cs_config"; exit ;;
  --debug | --debu | --deb | --de | --d | -d )
    debug=: ;;
  --file | --fil | --fi | --f )
    $ac_shift
    as_fn_append CONFIG_FILES " '$ac_optarg'"
    ac_need_defaults=false;;
--header | --heade | --head | --hea )
    $ac_shift
    case $ac_optarg in
    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; # problem line
    esac
    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
    ac_need_defaults=false;;
  --he | --h)
    # Conflict between --help and --header
    as_fn_error $? "ambiguous option: \`$1'

私はLinux Mint 17.1を実行しており、システムにPython 2.7と3.4がインストールされています。すべての依存関係を解決したと思いますが、なぜこのエラーが引き続き発生するのかわかりません。

ベストアンサー1

dashこれはデフォルトのシェルに関連しているようですがbash

ls -l /bin/sh

に基づいてこの回答@Gillesが提供したように、スクリプトの最初の行を変更してみることができますconfigure

これを変える

#!/bin/sh

到着

#!/bin/bash

また、見ることができますこれLinuxミントフォーラムで。

shellこのコマンドを使用してデフォルト値を確認できます。

readlink -f /bin/sh

編集する:

コマンドプロンプトで次のことを試してください。

CONFIG_SHELL=/bin/bash; export CONFIG_SHELL
$CONFIG_SHELL ./configure

おすすめ記事