suse linux编译安装GCC报错
gcc编译安装过程
1.先安装三个库 gmp mprc mpc 这三个库的源码要到官网去下载
1)安装gmp:首先建立源码同级目录 gmp-build,输入命令,第一次编译不通过,发现缺少一个叫m4的东西 于是就用apt-get下载了一个,继续编译,没有报错。make的时候出现大量信息并且生成一些文件在当前文件夹下,之后用make check检查一下,最后用make install安装
2)安装mpfr:
首先建立源码文件夹同级目录mpfr-build
然后进入该目录输入../mpfr-2.4.2/configure --prefix=/usr/local/mpfr-2.4.2 --with-gmp=/usr/local/gmp-4.3.2
然后make
make check
make install
3)安装mpc
类似与上面 不过要把依赖关系包含进去具体命令如下
../mpc-0.8.1/configure --prefix=/usr/local/mpc-0.8.1 --with-gmp=/usr/local/gmp-4.3.2 --with-mpfr=/usr/local/mpfr-2.4.2
然后同样是make
make check
make install
2.编译gcc
1)建立一个objdir来存放目标文件 然后进入该文件夹输入
/home/wulei/sourcecode/gcc-4.6.2/configure --prefix=/usr/local/gcc-4.6.2 --enable-threads=posix --disable-checking --disable-multilib --enable-languages=c --with-gmp=/usr/local/gmp-4.3.2/ --with-mpfr=/usr/local/mpfr-2.4.2/ --with-mpc=/usr/local/mpc-0.8.1/
最终用:../gcc-4.6.2/configure --prefix=/usr/gcc-4.6.9 --enable-threads=posix --disable-checking --disable-multilib --enable-languages=c --with-gmp=/usr/gmp-4.3.2 --with-mpfr=/usr/mpfr-2.4.2 --with-mpc=/usr/mpc-0.8.1
2)make
make check
make install
出现问题make的时候提示如下:
Checking for suffix of object files... configure: error: in `/home/wulei/sourcecode/gcc-4.6.2/i686-pc-linux-gnu/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
make[2]: *** [configure-stage1-target-libgcc] 错误 1
make[2]:正在离开目录 `/home/wulei/sourcecode/gcc-4.6.2'
make[1]: *** [stage1-bubble] 错误 2
make[1]:正在离开目录 `/home/wulei/sourcecode/gcc-4.6.2'
make: *** [all] 错误 2
于是 进入/home/wulei/sourcecode/gcc-4.6.2/i686-pc-linux-gnu/libgcc查看这个路径下的config.log
发现如下的错误提示:
/home/wulei/sourcecode/gcc-4.6.2/host-i686-pc-linux-gnu/gcc/cc1: error while loading shared libraries: libmpfr.so.1: cannot open shared ob ject file: No such file or directory
上网查找这个问题
原因是因为linux在make的时候没有自动寻找新加入的库所以要用命令加入
LD_LIBRARY_PATH=/usr/local/mpc-0.8.1/lib:/usr/local/mpfr-2.4.2/lib:/usr/local/gmp-4.3.2/lib
echo $LD_LIBRARY_PATH
export $LD_LIBRARY_PATH
lp
然而又遇到一个fatal error不知如何处理 正在处理中
追加处理:
问题终于全部搞清 根本原因是multiarchitecture的原因
只要再修改LIBRARY_PATH就可以了
exportLIBRARY_PATH=/usr/lib/x86_64-linux-gnu
suse linux编译安装GCC报错的更多相关文章
- linux下安装php报错configure: error: Cannot find MySQL header files under /usr/include/mysql.
linux下安装php报错configure: error: Cannot find MySQL header files under /usr/include/mysql. 2013-03-04 1 ...
- Ubuntu操作系统编译安装zabbix报错汇总
Ubuntu操作系统编译安装zabbix报错汇总 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.报错提示:"configure: error: MySQL libra ...
- Linux下安装redis报错信息
redis在Linux安装报错 标签: redislinuxcentos 2017-02-24 13:46 384人阅读 评论(0) 收藏 举报 分类: Linux安装工具(2) 版权声明:本文为 ...
- 编译安装nginx报错 checking for C compiler ... not found
编译安装在执行./configure步骤报错,是因为缺少环境变量 checking for C compiler - not found ./configure: error: C compiler ...
- Linux编译安装GCC
1. 下载gcc安装包 网址:http://ftp.gnu.org/gnu/gcc/ ,下载对应的安装包,我选择gcc-5.5.0.tar.gz 2. 下载依赖库 一个是mpc,一个是gmp,一个是m ...
- Linux下安装vim-plug报错:Failed to connect to raw.githubusercontent.com port 443: Connection refused
安装vim-plug时,输入以下命令: curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.c ...
- suse linux 编译安装Apache时报“APR NOT FOUND”的解决方法
今日编译apache时出错: #./configure --prefix……检查编辑环境时出现: checking for APR... noconfigure: error: APR not fou ...
- CentOS 5 64bit 编译安装MySQL报错
报错情况: 在执行./configure时出现configure: error: No curses/termcap library found 解决方法: ./configure时加上参数--w ...
- 编译安装openssl报错:POD document had syntax errors at /usr/bin/pod2man line 69. make: *** [install_docs]
错误如下: cms.pod around line 457: Expected text after =item, not a number cms.pod around line 461: Expe ...
随机推荐
- java 基本知识点学习
1 基本数据类型 整型4种:byte 1个字节:short 2个字节:int 4个字节:long 8个字节. 浮点型:float 4个字节;double 8个字节: 布尔型:boolean tru ...
- MongoDB的索引
一.索引详讲 索引是什么,索引就好比一本书的目录,当我们想找某一章节的时候,通过书籍的目录可以很快的找到,所以适当的加入索引可以提高我们查询的数据的速度. 准备工作,向MongoDB中插入20000条 ...
- ubuntu出现有线已连接却无法上网
或者直接追加到/etc/sysctl.conf 如果遇到“设备未托管”,一般是台式机默认移动ip后禁用网络. 那么修改/etc/NetworkManager/NetworkManager.conf,设 ...
- SQL求差集
数据库环境:SQL SERVER 2008R2 Sql Server有提供求集合差集的函数——EXCEPT.先看看EXCEPT的用法, { <query_specification> | ...
- ExtJs中处理时间,出现NaN-NaN-NaN的解决方式
关键字: extjs日期格式问题(二) 一般我们的前台代码Ext.grid.ColumnModel里会这样写,以便显示日期格式: Js代码 1..... 2.{header:"birth ...
- jQuery分析(2) - $工厂函数分析
前言 从这节进入jQuery的世界,首先从jQuery的入口函数开始了解jQuery()或$是如何运作的,这里我给出了一个最小的例子来分析. 回忆 在进入分析代码前我们回想下jQuery的使用方法有哪 ...
- gulp + browserSync 一起提高前端开发效率吧!
前端开发的时候,每次修改代码后,要移动鼠标到浏览器选中再刷新查看效果,不知觉间我们的加班的时间又增加了0.5s, 真是罪孽!所以在使用gulp之后,就一直对能自动监听文件刷新页面的browserSyn ...
- ubuntu安装配置搜狗拼音输入法
进入下载目录,在终端执行安装 $sudo dpkg -i sogou_pinyin_linux_1.0.0.0033_amd64.deb 安装过程会出现 依赖关系问题 2 修复依赖关系完成搜狗拼 ...
- C++ xmmp IM开发笔记(一)
XMMP C++库采用 gloox (client) 下载地址:http://camaya.net/download/gloox-1.0.11.tar.bz2 glooxd (server) 下载地址 ...
- 登录超时,给出提示跳到登录页面(ajax、导入、导出)
一.一般页面登录超时验证,可以用过滤器filter,如下: package com.lg.filter; import java.io.IOException; import javax.servle ...