rlwrap安装Invalid configuration `x86_64-unknown-linux-':问题解决

简介: <p><a target="_blank" href="http://yjh625.blog.51cto.com/225746/1262290" style="outline:none; color:rgb(0,135,202); font-family:SimSun; font-size:20px; font-weight:bold; line-height:20px; text-ali

rlwrap安装Invalid configuration `x86_64-unknown-linux-':问题解决



今天在安装rlwrap的过程中出现如下报错,具体信息如下:

1
2
checking build system  type ... Invalid configuration `x86_64-unknown-linux- ': machine `x86_64-unknown-linux'  not recognized
configure: error:  /bin/sh  tools /config .sub x86_64-unknown-linux- failed

先交代下系统环境,系统为RedHat 5.3 64bit:

1
2
3
4
[root@vm-1 rlwrap-0.37] # uname -a
Linux vm-1 2.6.18-128.el5xen  #1 SMP Wed Dec 17 12:01:40 EST 2008 x86_64 x86_64 x86_64 GNU/Linux
[root@vm-1 rlwrap-0.37] # getconf LONG_BIT
64

首先查看configure命令运行过程中是那条命令引起错误:

1
2
3
4
5
6
7
8
9
10
11
12
[root@szmlvm29-54 ~] # nohup sh -x ./configure && vim nohup
......
printf  %s  'checking build system type... '
checking build system  type ... +  test  ''  set
+ ac_build_alias=
test  x = x
++  /bin/sh  tools /config .guess
+ ac_build_alias=x86_64-unknown-linux-
test  xx86_64-unknown-linux- = x
++  /bin/sh  tools /config .sub x86_64-unknown-linux-
Invalid configuration `x86_64-unknown-linux- ': machine `x86_64-unknown-linux'  not recognized
......

可以看到引起condifure出现错误的原因是由于变量ac_build_alias值引起的,再查看configure脚本的内容发现ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2205 { $as_echo  "$as_me:${as_lineno-$LINENO}: checking build system type"  >&5
[root@vm-1 rlwrap-0.37] # vim configure
......
2206 $as_echo_n  "checking build system type... "  >&6; }
2207  if  test  "${ac_cv_build+set}"  set then  :
2208   $as_echo_n  "(cached) "  >&6
2209  else
2210   ac_build_alias=$build_alias
2211  test  "x$ac_build_alias"  = x &&
2212   ac_build_alias=`$SHELL  "$ac_aux_dir/config.guess" `
2213  test  "x$ac_build_alias"  = x &&
2214   as_fn_error  "cannot guess build type; you must specify one"  "$LINENO"  5
2215 ac_cv_build=`$SHELL  "$ac_aux_dir/config.sub"  $ac_build_alias` ||
2216   as_fn_error  "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed"  "$LINENO"  5
2217
2218  fi
......

再综合两者得知,实际就是/bin/sh tools/config.guess这个脚本执行出现问题,通过脚本sh -xtools/config.guess来查看脚本执行情况,然后比对正常运行和出现错误脚本的情况:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
[root@vm-1 tools] # sh -x ./config.guess
......出现错误
++  test  x = x
++ CC_FOR_BUILD=no_compiler_found
++ set_cc_for_build=
cat
++ no_compiler_found -E  /tmp/cgb13341/dummy .c
++  grep  LIBC=
++  sed  -e  's: ::g'
eval
case  "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}"  in
echo  x86_64-unknown-linux-
x86_64-unknown-linux-
exit
......
正常情况
......
++  test  xcc = x
++ set_cc_for_build=
cat
++ cc -E  /tmp/cgm24262/dummy .c
++  grep  LIBC=
++  sed  -e  's: ::g'
eval  LIBC=gnu
++ LIBC=gnu
case  "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}"  in
echo  x86_64-unknown-linux-gnu
x86_64-unknown-linux-gnu
exit
......

如上通过以上分析可以发现,出现这个故障其实就是因为系统命令cc不存在引起的,解决方法就是安装gcc就行。

1
[root@vm-1 ~] # yum install -y gcc

目录
相关文章
|
15天前
|
Unix Linux
Linux/FreeBSD 安装
在Linux/FreeBSD上安装Julia 1.7.2的步骤:从[官方](https://julialang-s3.julialang.org/bin/linux/x64/1.7/julia-1.7.2-linux-x86_64.tar.gz)或[Tsinghua镜像](https://mirrors.tuna.tsinghua.edu.cn/julia-releases/bin/linux/x86/1.7/julia-1.7.2-linux-i686.tar.gz)下载二进制包,然后使用`tar`解压。
|
21小时前
|
IDE Linux 开发工具
Linux 系统上安装
在Linux和Mac上安装Lua 5.3.0只需下载源码,解压,编译和安装。Windows用户可选择SciTE IDE或通过LuaForWindows在Github或Google Code下载安装。创建 HelloWorld.lua,使用`lua HelloWorld.lua`运行显示&quot;Hello World!&quot;。另可参考LuaDist官方推荐方式安装。
|
2天前
|
Oracle 关系型数据库 Linux
SuSE linux server 11通过SAP来安装oracle11g
SuSE linux server 11通过SAP来安装oracle11g
|
2天前
|
Linux C语言
suse linux 11 安装GCC开发环境
suse linux 11 安装GCC开发环境
|
4天前
|
关系型数据库 MySQL Linux
在Linux系统上实现高效安装与部署环境的全方位指南
在Linux系统上实现高效安装与部署环境的全方位指南
|
4天前
|
NoSQL Linux Redis
Redis的介绍,以及Redis的安装(本机windows版,虚拟机Linux版)和Redis常用命令的介绍
Redis的介绍,以及Redis的安装(本机windows版,虚拟机Linux版)和Redis常用命令的介绍
17 0
|
4天前
|
Ubuntu 安全 Linux
linux系统详细安装过程,都在这里了
linux系统详细安装过程,都在这里了
12 0
|
4天前
|
JSON Linux 数据格式
在宝塔Linux中安装Docker
在宝塔Linux中安装Docker
|
4天前
|
运维 监控 安全
2023年最详细的:本地Linux服务器安装宝塔面板,并内网穿透实现公网远程登录
2023年最详细的:本地Linux服务器安装宝塔面板,并内网穿透实现公网远程登录
|
6天前
|
安全 Linux Python
Volatility3内存取证工具安装及入门在Linux下的安装教程
Volatility3内存取证工具安装及入门在Linux下的安装教程
Volatility3内存取证工具安装及入门在Linux下的安装教程