【Linux operation 33】configure: error: no acceptable C compiler found in $PATH

1、SUSE升级gcc时出现异常

linux-1psk:/gcc/gcc-12.1.0/build # ../configure -enable-checking=release -enable-languages=c,c++ -disable-multilib
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for gawk... gawk
checking for libatomic support... yes
checking for libitm support... yes
checking for libsanitizer support... yes
checking for libvtv support... yes
checking for libphobos support... yes
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/gcc/gcc-12.1.0/build':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details

2、解决办法

gcc编译器不在你的PATH,意味着要么没有安装gcc,要么不在PATH,意味着要么没有安装gcc,要么不在PATHgccPATH变量中;

以root身份安装gcc

linux-1psk:/gcc/gcc-12.1.0/build # zypper install gcc
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following 9 NEW packages are going to be installed:
  gcc gcc48 glibc-devel libasan0 libatomic1 libgomp1 libitm1 libtsan0 linux-glibc-devel

9 new packages to install.
Overall download size: 11.0 MiB. Already cached: 0 B. After the operation, additional 43.0 MiB will be used.
Continue? [y/n/...? shows all options] (y): y
Retrieving package linux-glibc-devel-4.12-3.3.1.noarch                                                                                                                                   (1/9),   1.2 MiB (  5.5 MiB unpacked)Retrieving package libasan0-4.8.5-31.20.1.x86_64                                                                                                                                         (2/9),  79.8 KiB (166.8 KiB unpacked)Retrieving package libatomic1-8.2.1+r264010-1.3.3.x86_64                                                                                                                                 (3/9),  16.1 KiB ( 26.1 KiB unpacked)Retrieving package libgomp1-8.2.1+r264010-1.3.3.x86_64                                                                                                                                   (4/9), 102.2 KiB (255.7 KiB unpacked)Retrieving package libitm1-8.2.1+r264010-1.3.3.x86_64                                                                                                                                    (5/9),  34.5 KiB (110.4 KiB unpacked)Retrieving package libtsan0-8.2.1+r264010-1.3.3.x86_64                                                                                                                                   (6/9), 280.9 KiB (929.1 KiB unpacked)Retrieving package glibc-devel-2.22-100.15.4.x86_64                                                                                                                                      (7/9), 665.3 KiB (  3.0 MiB unpacked)Retrieving package gcc48-4.8.5-31.20.1.x86_64                                                                                                                                            (8/9),   8.6 MiB ( 33.1 MiB unpacked)Retrieving package gcc-4.8-6.189.x86_64                                                                                                                                                  (9/9),   5.4 KiB (    0   B unpacked)
Checking for file conflicts: ...................................................
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值