zoukankan      html  css  js  c++  java
  • CentOS 7如何添加gcc toolchain(32位)以及遇到的问题解决

    1. 解压gcc_toolchain到/usr目录;

    2. 执行:sudo gedit /etc/profile:

      添加export PATH=$PATH:/usr/.../.../bin/

    3. 执行:source /etc/profile 

      通过指令:echo $PATH 查看是否有成功添加环境变量;

    4. 编译对应source code,一般会遇到如下几个问题

      4.1 使用的时候出现一个错误

        bash: /usr/local/bin/rar: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory

        是因为64位系统中安装了32位程序

        解决方法:yum install glibc.i686
      4.2 若遇到“error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
         解决方法:yum install zlib.i686
      4.3 若继续出现“error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
        解决方法:先查找这个库存在于哪个安装包中

          yum whatprovides libstdc++.so.6

        得到信息:
          Loaded plugins: fastestmirror, refresh-packagekit, security
          Loading mirror speeds from cached hostfile
          * base: mirrors.yun-idc.com
          * epel: mirror.premi.st
          * extras: mirrors.yun-idc.com
          * updates: mirrors.btte.net
          libstdc++-4.8.5-4.el7.i686: GNU Standard C++ Library
          Repo : base
          Matched from:
          Other : libstdc++.so.6

        可以看到包  libstdc++-4.8.5-4.el7.i686

        执行命令: yum install libstdc++-4.8.5-4.el7.i686

    ==========================================

    20160719 补充

      make menuconfig的时候报错

      ./tools/mconf: error while loading shared libraries: libncursesw.so.5: cannot open shared object file: No such file or directory
    make: *** [menuconfig] Error 127
      解决办法: 执行 yum whatprovides libncursesw.so.5
        Loaded plugins: fastestmirror, langpacks
        Determining fastest mirrors
         * base: mirrors.aliyun.com
         * extras: mirrors.zju.edu.cn
         * updates: mirrors.aliyun.com
        ncurses-libs-5.9-13.20130511.el7.i686 : Ncurses libraries
        Repo        : base
        Matched from:
        Provides    : libncursesw.so.5
      然后执行 yum install ncurses-libs-5.9-13.20130511.el7.i686

     缺mkimage的时候

    在uboot的tools里面,把这个mkimage考到/usr/bin下就行了:

    #cp mkimage /usr/bin/mkimage

    记得要chmod 755 mkimage

    yum install make

    yum groupinstall "Development Tools"

    yum install gcc gcc-c++ kernel-devel

  • 相关阅读:
    uIP学习笔记
    ALIENTEK 战舰ENC28J60 LWIP和UIP补充例程
    PID整定方法
    ENC28j60以太网芯片驱动程序简介
    Petit FatFs
    如何使用可控硅?(详细教程)
    Linux查看系统资源占用
    驾照科目三考试通过需要注意什么?
    科目三考试
    驾照的科目三考试中,如何完成直线行驶?
  • 原文地址:https://www.cnblogs.com/cutelinux/p/5682352.html
Copyright © 2011-2022 走看看