CentOSmini安装gcc8.2

本文详细记录了在编译GCC8.2过程中遇到的多种错误及其解决方案,包括缺少C编译器、依赖库GMP、MPFR、MPC的安装,以及配置缓存引起的编译失败等问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一.
如果遇到类似问题:

    configure: error: in `/usr/local/src/gcc-8.2.0/temp':
    configure: error: no acceptable C compiler found in $PATH
    See `config.log' for more details.

解决:

   yum install gcc

 

二. 

如果遇到类似问题:

    configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+.,mpfr2.4.0

解决:

    sudo yum install  gmp  gmp-devel  mpfr  mpfr-devel  libmpc  libmpc-devel

 

三. 
 
如遇类似问题:

        configure: error: in `/usr/local/src/gcc-8.2.0/temp/gcc':
     configure: error: C++ preprocessor "/lib/cpp" fails sanity check


解决:
    1.   yum install glibc-headers
    2.   yum install gcc-c++
 http://abcdxyzk.github.io/blog/2013/10/25/compiler-gcc-make/

 https://www.jianshu.com/p/87ebf6e73576

这两网站解决三个依赖的问题......这个提示太不友好了  搞得我以为没装好,,装了三遍(看了这个https://www.jianshu.com/p/87ebf6e73576才发现原来早就好了)

 

四.
        错误:

Configuring stage 1 in ./gcc
configure: loading cache ./config.cache
configure: error: `CXX' has changed since the previous run:
configure:   former value:  `g++'
configure:   current value: `g++ -std=gnu++98'
configure: error: `GMPLIBS' has changed since the previous run:
configure:   former value:  `-lmpc -lmpfr -lgmp'
configure:   current value: `-L/usr/local/src/gmp-6.1.2/lib/lib -L/usr/local/src/mpc-1.1.0/lib/lib -lmpc -lmpfr -lgmp'
configure: error: `GMPINC' has changed since the previous run:
configure:   former value:  `'
configure:   current value: `-I/usr/local/src/gmp-6.1.2/lib/include -I/usr/local/src/mpc-1.1.0/lib/include '
configure: error: in `/usr/local/src/gcc-8.2.0/temp/gcc':
configure: error: changes in the environment can compromise the build
configure: error: run `make distclean' and/or `rm ./config.cache' and start over
make[2]: *** [configure-stage1-gcc] 错误 1
make[2]: 离开目录“/usr/local/src/gcc-8.2.0/temp”
make[1]: *** [stage1-bubble] 错误 2
make[1]: 离开目录“/usr/local/src/gcc-8.2.0/temp”
make: *** [all] 错误 2
    

    解决:
      暂无

 

各种方法都报错,试下自带脚本,,,,,,,还是报错,,,弱弱一句,,nmp

[root@localhost gcc-8.2.0]# contrib/download_prerequisites
wget:无法识别的选项“--no-verbose”
用法: wget [选项]... [URL]...

请尝试使用“wget --help”查看更多的选项。
wget:无法识别的选项“--no-verbose”
用法: wget [选项]... [URL]...

请尝试使用“wget --help”查看更多的选项。
wget:无法识别的选项“--no-verbose”
用法: wget [选项]... [URL]...

请尝试使用“wget --help”查看更多的选项。
wget:无法识别的选项“--no-verbose”
用法: wget [选项]... [URL]...

请尝试使用“wget --help”查看更多的选项。
sha512sum: gmp-6.1.0.tar.bz2: 没有那个文件或目录
gmp-6.1.0.tar.bz2:打开或读取失败
sha512sum: 警告:1 个列出的文件无法读取
error: Cannot verify integrity of possibly corrupted file gmp-6.1.0.tar.bz2


解决方法 :
    解决不了.......................能不能让我成功编译啊

 附上我的安装过程  

../configure --prefix=/usr/local/src/gcc-8.2.0/ \
   --with-mpc=/usr/local/src/mpc-1.1.0/lib \
   --with-mpfc=/usr/local/src/mpfr-4.0.1/lib \
   --with-gmp=/usr/local/src/gmp-6.1.2/lib

这一步中间好像也有报错...第一次编译的时候是没有的(编译了一天一夜,是时候换台电脑了).....

      The following languages will be built: c,c++,fortran,lto,objc
      *** This configuration is not supported in the following subdirectories:
      gnattools gotools target-libada target-libhsail-rt target-libgo target-libffi target-liboffloadmic
      (Any other directories should still work fine.)
      checking for default BUILD_CONFIG... bootstrap-debug
      checking for --enable-vtable-verify... no
      *** removing intl/Makefile to force reconfigure
      *** removing libiberty/Makefile to force reconfigure
      *** removing lto-plugin/Makefile to force reconfigure

这一段不知道是不是报错

  然后是make 就报错了 就是上面那个

来个大佬给我说下我哪里错了吧  

 

https://blog.youkuaiyun.com/chenjia6605/article/details/82757568  不知道这个能不能装好  我没试   反正我安装了那些东西后没好 还是报错

yum groupinstall -y 'Development Tools'

yum install -y texinfo bison flex gcc-gnat glibc-devel.i686 libgcc.i686

 
 

 


还是熟悉的错误 怎么还没人来看呀 大佬们 快来教我啊

make[1]: 进入目录“/usr/local/src/gcc-8.2.0/temp” /bin/sh ../mkinstalldirs /usr/local/gcc8.2 /usr/local/gcc8.2 mkdir -p -- /usr/local/gcc8.2 /usr/local/gcc8.2 make[2]: 进入目录“/usr/local/src/gcc-8.2.0/temp/fixincludes” make[2]: *** 没有规则可以创建目标“install”。 停止。 make[2]: 离开目录“/usr/local/src/gcc-8.2.0/temp/fixincludes” make[1]: *** [install-fixincludes] 错误 2 make[1]: 离开目录“/usr/local/src/gcc-8.2.0/temp” make: *** [install] 错误 2

 

转载于:https://www.cnblogs.com/pbblogs/p/9867124.html

(fealpy_env) py@py:~$ pip3 install PyMUMPS Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting PyMUMPS Downloading https://pypi.tuna.tsinghua.edu.cn/packages/8d/36/75ff7ce99ff1f65132af5a310c10eeb6f80537ad352570a39f1c1eb239b7/pymumps-0.3.3.tar.gz (8.2 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Collecting mpi4py (from PyMUMPS) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/85/22/4d9a9290010d4b95d3991ac383b2b7763ecebccafe366cb64f4abf479c41/mpi4py-4.1.0-cp310-cp310-manylinux1_x86_64.manylinux_2_5_x86_64.whl (1.4 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.4/1.4 MB 10.7 MB/s eta 0:00:00 Building wheels for collected packages: PyMUMPS Building wheel for PyMUMPS (pyproject.toml) ... error error: subprocess-exited-with-error × Building wheel for PyMUMPS (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [40 lines of output] /tmp/pip-build-env-d5nmvfu3/overlay/lib/python3.10/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated. !! ******************************************************************************** Please consider removing the following classifiers in favor of a SPDX license expression: License :: OSI Approved :: BSD License See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details. ******************************************************************************** !! self._finalize_license_expression() running bdist_wheel running build running build_py creating build/lib.linux-x86_64-cpython-310/mumps copying mumps/__init__.py -> build/lib.linux-x86_64-cpython-310/mumps running build_ext warning: mumps/_dmumps.pyx:62:23: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line. warning: mumps/_dmumps.pyx:62:29: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line. warning: mumps/_dmumps.pyx:62:38: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line. warning: mumps/_dmumps.pyx:62:51: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line. warning: mumps/_dmumps.pyx:63:23: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line. warning: mumps/_dmumps.pyx:63:37: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line. warning: mumps/_dmumps.pyx:63:48: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line. warning: mumps/_dmumps.pyx:67:27: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line. warning: mumps/_dmumps.pyx:67:37: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line. warning: mumps/_dmumps.pyx:68:28: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line. warning: mumps/_dmumps.pyx:68:40: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line. Compiling mumps/_dmumps.pyx because it changed. [1/1] Cythonizing mumps/_dmumps.pyx building 'mumps._dmumps' extension creating build/temp.linux-x86_64-cpython-310/mumps x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/home/py/fealpy_env/include -I/usr/include/python3.10 -c mumps/_dmumps.c -o build/temp.linux-x86_64-cpython-310/mumps/_dmumps.o mumps/_dmumps.c:1136:10: fatal error: dmumps_c.h: No such file or directory 1136 | #include "dmumps_c.h" | ^~~~~~~~~~~~ compilation terminated. error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for PyMUMPS Failed to build PyMUMPS ERROR: Failed to build installable wheels for some pyproject.toml based projects (PyMUMPS) (fealpy_env) py@py:~$
最新发布
07-05
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值