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,要么不在PATH,意味着要么没有安装gcc,要么不在PATH变量中;
以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: ...................................................

最低0.47元/天 解锁文章
7442

被折叠的 条评论
为什么被折叠?



