无法编译任何软件

无法编译任何软件

我有 Linux Mint 17。我想从源代码编译 python 3.4.2。在 ./configure 命令期间,一切都很顺利,直到出现错误。

configure: creating ./config.status
./config.status: line 476: syntax error near unexpected token `)'
./config.status: line 476: `    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;'

这不是我第一次遇到这个问题。当我从源代码编译任何软件时会发生此问题。
编辑:我正在添加命令 cat -n config.status | 的输出sed '463,505!d'

case $ac_option in
# 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
case $ac_optarg in
*\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
'') as_fn_error $? "missing file argument" ;;
esac
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"` ;;
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'
Try \`$0 --help' for more information.";;
--help | --hel | -h )
$as_echo "$ac_cs_usage"; exit ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil | --si | --s)
ac_cs_silent=: ;;

# This is an error.
-*) as_fn_error $? "unrecognized option: \`$1'
Try \`$0 --help' for more information." ;;

*) as_fn_append ac_config_targets " $1"
ac_need_defaults=false ;;

esac

答案1

您不使用 Mint 标准的基于 Debian 的包管理器有什么原因吗?不建议您自己编译。

出现这种情况大多是因为:

  1. 您缺少一些依赖项。在“./configure”阶段,这将显示为错误。
  2. 您可能有旧的编译器,或者编译器不满足您正在编译的包的要求。如果是这种情况,您应该将编译器更新gcc到最新版本。如果可能的话,我强烈建议您使用基于 Debian 的包管理器进行更新gcc

此外,您应该使用包管理器定期更新系统。在您必须自己编译和安装某些内容的情况下,请以普通用户身份发出./configure和并仅以root 权限使用(即在源目录中)。makemake installsudo make install

相关内容