首页 > 系统相关 >(总结)linux安装expect(包括gcc&tcl)

(总结)linux安装expect(包括gcc&tcl)

时间:2022-10-10 21:38:01浏览次数:77  
标签:gcc x86 el6 100% tcl 64 expect rpm


1.安装gcc


首先到​​http://vault.centos.org/6.3/os/x86_64/Packages/​​下载用到的rpm包,包括:ppl-0.10.2-11.el6.x86_64.rpm 、cloog-ppl-0.15.7-1.2.el6.x86_64.rpm 、mpfr-2.4.1-6.el6.x86_64.rpm 、cpp-4.4.6-4.el6.x86_64.rpm 、kernel-headers-2.6.32-279.el6.x86_64.rpm 、glibc-headers-2.12-1.80.el6.x86_64.rpm 、glibc-devel-2.12-1.80.el6.x86_64.rpm 、libstdc++-devel-4.4.6-4.el6.x86_64.rpm 、gcc-4.4.6-4.el6.x86_64.rpm 、gcc-c++-4.4.6-4.el6.x86_64.rpm

 

[root@localhost gcc_rpm]# rpm -ivh ppl-0.10.2-11.el6.x86_64.rpm 

warning: ppl-0.10.2-11.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID c105b9de: NOKEY

Preparing...                ########################################### [100%]

   1:ppl                    ########################################### [100%]

 

[root@localhost gcc_rpm]# rpm -ivh cloog-ppl-0.15.7-1.2.el6.x86_64.rpm 

warning: cloog-ppl-0.15.7-1.2.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID c105b9de: NOKEY

Preparing...                ########################################### [100%]

   1:cloog-ppl              ########################################### [100%]

 

[root@localhost gcc_rpm]# rpm -ivh mpfr-2.4.1-6.el6.x86_64.rpm 

warning: mpfr-2.4.1-6.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID c105b9de: NOKEY

Preparing...                ########################################### [100%]

   1:mpfr                   ########################################### [100%]

 

[root@localhost gcc_rpm]# rpm -ivh cpp-4.4.6-4.el6.x86_64.rpm 

warning: cpp-4.4.6-4.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY

Preparing...                ########################################### [100%]

   1:cpp                    ########################################### [100%]

 

[root@localhost gcc_rpm]# rpm -ivh kernel-headers-2.6.32-279.el6.x86_64.rpm 

warning: kernel-headers-2.6.32-279.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY

Preparing...                ########################################### [100%]

   1:kernel-headers         ########################################### [100%]

 

[root@localhost gcc_rpm]# rpm -ivh glibc-headers-2.12-1.80.el6.x86_64.rpm 

warning: glibc-headers-2.12-1.80.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY

Preparing...                ########################################### [100%]

   1:glibc-headers          ########################################### [100%]

 

[root@localhost gcc_rpm]# rpm -ivh glibc-devel-2.12-1.80.el6.x86_64.rpm 

warning: glibc-devel-2.12-1.80.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY

Preparing...                ########################################### [100%]

   1:glibc-devel            ########################################### [100%]

 

[root@localhost gcc_rpm]# rpm -ivh gcc-4.4.6-4.el6.x86_64.rpm 

warning: gcc-4.4.6-4.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY

Preparing...                ########################################### [100%]

   1:gcc                    ########################################### [100%]

 

以下两个可以不安装:

[root@localhost gcc_rpm]# rpm -ivh libstdc++-devel-4.4.6-4.el6.x86_64.rpm 

warning: libstdc++-devel-4.4.6-4.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY

Preparing...                ########################################### [100%]

   1:libstdc++-devel        ########################################### [100%]

 

[root@localhost gcc_rpm]# rpm -ivh gcc-c++-4.4.6-4.el6.x86_64.rpm 

warning: gcc-c++-4.4.6-4.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY

Preparing...                ########################################### [100%]

   1:gcc-c++                ########################################### [100%]

 

即使该包安装成功,后续还是会出现同样的软件依赖包问题

软件包依赖性的问题,用nodeps属性一定能装上
rpm -Uvh *.rpm --nodeps --force

 

安装完成gcc后可以使用gcc -v查看是否安装成功

同样可以参考:

​http://linux.chinaunix.net/techdoc/develop/2007/07/05/961887.shtml​

 

2.安装expect之前,还需要安装tcl

a.下载源码包
wget http://nchc.dl.sourceforge.net/sourceforge/tcl/tcl8.4.11-src.tar.gz

 

b.解压缩源码包
tar xfvz tcl8.4.11-src.tar.gz

 

c.进入/soft/tcl8.4.11/unix 目录 

        a.执行sed -i "s/relid'/relid/" configure 
        b.执行./configure --prefix=/expect 
        c.执行make 
        d.执行make install 
        e.执行mkdir -p /tools/lib 
        f.执行cp tclConfig.sh /tools/lib/ 
        g. 将/tools/bin目录export到环境变量 
           tclpath=/tools/bin 
           export tclpath 

 

d.安装expect

        进入/soft/expect-5.43目录 

        执行./configure --prefix=/tools --with-tcl=/tools/lib --with-x=no 
        如果最后一行提示: 
        configure: error: Can't find Tcl private headers 
        需要添加一个头文件目录参数 
        --with-tclinclude=../tcl8.4.11/generic,即 
        ./configure --prefix=/tools --with-tcl=/tools/lib --with-x=no --with-tclinclude=../tcl8.4.11/generic 
        ../tcl8.4.11/generic 就是tcl解压安装后的路径,一定确保该路径存在 
        执行make 
        执行make install 
        编译完成后会生在/tools/bin内生成expect命令 
        执行/tools/bin/expect出现expect1.1>提示符说明expect安装成功. 

 

e.创建一个符号链接

        ln -s /tools/bin/expect /usr/bin/expect 
        查看符号连接 
        ls -l /usr/bin/expect 
        lrwxrwxrwx 1 root root 17 06-09 11:38 /usr/bin/expect -> /tools/bin/expect 

        这个符号链接将在编写expect脚本文件时用到,例如在expect文件头部会指定用于执行该脚本的shell 
        #!/usr/bin/expect 

        创建符号链接后,可以使用which expect查出expect

 

参考:http://bluethink.iteye.com/blog/1079044

 

 

标签:gcc,x86,el6,100%,tcl,64,expect,rpm
From: https://blog.51cto.com/u_15740686/5745319

相关文章

  • 2022-2023-1 2021131蓝宇 实验一 熟悉Linux命令-2-gcc
    一、实验目的二、实验步骤三、实验过程中遇到的问题及解决四、实验感想一、实验目的熟悉Linux开发环境并学会Linux开发环境的配置和使用,熟悉arm箱的使用,熟悉以下知识点......
  • CentOS gcc升级 9.3.0
    一、CentOS7.9gcc升级9.3.0地址https://mirrors.ustc.edu.cn/gnu/gcc/gcc-9.3.0/gcc-9.3.0.tar.xzhttp://ftp.tsukuba.wide.ad.jp/gcc/releases/gcc-9.3.0/?C=N&O=D......
  • 【bug】Column count of mysql.user is wrong. Expected 45, found 42. Created with
    问题描述:数据库进行了版本升级(5.5.31->5.7.27),兼容旧数据时报错Columncountofmysql.useriswrong.Expected45,found42.CreatedwithMySQL50531原因分析:错误是由......
  • liunx之expect操作详解
    导航:一、expect安装、介绍、使用场景二、expect使用原理三、expect使用语法四、expect使用举例五、expect相关错误处理---------分割线----------一......
  • Linux CMake 指定gcc编译版本
    背景:无root下手动升级gcc版本为5.5之后,但是由于默认目录/usr/bin下的gcc是4.8.5,在cmake默认使用老版本的gcc,导致cmake失败。解决方案:注意!将下面的yourpath替换成新的gc......
  • 非root权限升级(修改当前用户)Linux gcc版本
    参考链接:非root权限升级(修改当前用户)Linuxgcc版本没有root权限,Linux离线升级gcc......
  • H2 数据库的 expected “identifier 错误
    尝试使用H2数据库创建表,但是老是提示expected"identifier这个错误。问题和解决经过搜索后才知道,上面的错误是因为我们使用的表名USER是H2的关键字。H2的关键字列......
  • ubuntu22 安装gcc
    使用aptitude包依赖管理工具代替apt来处理,aptitude软件包管理工具在解决依赖性问题上更有优势,具体使用方法如下:sudoapt-getinstallaptitude,sudoaptitudeinstallgcc......
  • 【gym102979E】Expected Distance(期望DP)
    ExpectedDistance题目链接:gym102979E题目大意有一棵树,第i个点的父亲再1~i-1中根据每个数的a值乘正比概率出现,然后边的长度是两端的点的b值的和。然后多组询问......
  • 执行shell脚本报错syntax error near unexpected token `$'\r''解决方法
     今天在进行性能测试时,正好需要一个老脚本,直接拿过来修改一下就可以使用,但是运行时直接报错了syntaxerrornearunexpectedtoken`$'\r'内心一万个WTF,为啥不行呢第一步 ......