AnolisOS-Devel.repo
Anolis OS 23.4 在宿主机安装后,可能不会创建该源
该源来自
openanolis/anolisos:23.4Docker 镜像
快速查看 Anolis OS 源 URL:
grep baseurl /etc/yum.repos.d/AnolisOS-*.repo
Anolis OS 源中,需要设置
enabled=1才能启用
该源的作用:例如:可以安装 gcc 14
[root@1ec2a2d4ee8c /]# cat /etc/yum.repos.d/AnolisOS-Devel.repo
[Devel]
name=AnolisOS-$releasever - Devel
baseurl=http://mirrors.openanolis.cn/anolis/$releasever/Devel/$basearch/os
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ANOLIS
gpgcheck=1
[root@1ec2a2d4ee8c /]#
搜索安装 gcc 14
未启用 AnolisOS-Devel.repo 源的情况下,只能安装 gcc 12
dnf clean all
dnf search --showduplicates gcc
[root@f2635efbd08f /]# dnf clean all
Failed to set locale, defaulting to C.UTF-8
19 files removed
[root@f2635efbd08f /]# dnf search --showduplicates gcc
Failed to set locale, defaulting to C.UTF-8
AnolisOS-23 - os 2.1 MB/s | 11 MB 00:04
AnolisOS-23 - updates 4.7 MB/s | 1.8 MB 00:00
Last metadata expiration check: 0:00:02 ago on Mon Aug 3 01:11:15 2026.
========================================================= Name Exactly Matched: gcc ==========================================================
gcc-12.3.0-20.an23.loongarch64 : Various compilers (C, C++, Objective-C, ...)
======================================================== Name & Summary Matched: gcc =========================================================
annobin-plugin-gcc-12.33-4.an23.loongarch64 : annobin gcc plugin
gcc-c++-12.3.0-20.an23.loongarch64 : C++ support for GCC
gcc-gdb-plugin-12.3.0-20.an23.loongarch64 : GCC plugin for GDB
gcc-plugin-devel-12.3.0-20.an23.loongarch64 : Support for compiling GCC plugins
libgcc-12.3.0-16.an23.loongarch64 : GCC version 12 shared support library
libgcc-12.3.0-20.an23.loongarch64 : GCC version 12 shared support library
libgccjit-12.3.0-20.an23.loongarch64 : Library for embedding GCC inside programs and libraries
libgccjit-devel-12.3.0-20.an23.loongarch64 : Support for embedding GCC inside programs and libraries
============================================================= Name Matched: gcc ==============================================================
gcc-gfortran-12.3.0-20.an23.loongarch64 : Fortran support
gcc-toolset-14-binutils-2.42-10.an23.loongarch64 : A GNU collection of binary utilities
gcc-toolset-14-binutils-2.42-8.an23.loongarch64 : A GNU collection of binary utilities
gcc-toolset-14-binutils-2.42-9.an23.loongarch64 : A GNU collection of binary utilities
gcc-toolset-14-binutils-devel-2.42-10.an23.loongarch64 : BFD and opcodes static and dynamic libraries and header files
gcc-toolset-14-binutils-devel-2.42-8.an23.loongarch64 : BFD and opcodes static and dynamic libraries and header files
gcc-toolset-14-binutils-devel-2.42-9.an23.loongarch64 : BFD and opcodes static and dynamic libraries and header files
gcc-toolset-15-binutils-2.44-3.an23.loongarch64 : A GNU collection of binary utilities
gcc-toolset-15-binutils-devel-2.44-3.an23.loongarch64 : BFD and opcodes static and dynamic libraries and header files
============================================================ Summary Matched: gcc ============================================================
libgomp-12.3.0-16.an23.loongarch64 : GCC OpenMP v4.5 shared support library
libgomp-12.3.0-20.an23.loongarch64 : GCC OpenMP v4.5 shared support library
[root@f2635efbd08f /]#
启用了 AnolisOS-Devel.repo 源的情况下,可以安装 gcc 14
dnf clean all
dnf search --showduplicates gcc
[root@f2635efbd08f /]# dnf clean all
Failed to set locale, defaulting to C.UTF-8
13 files removed
[root@f2635efbd08f /]# dnf search --showduplicates gcc
Failed to set locale, defaulting to C.UTF-8
AnolisOS-23 - os 2.2 MB/s | 11 MB 00:04
AnolisOS-23 - updates 7.3 MB/s | 1.8 MB 00:00
AnolisOS-23 - Devel 7.2 MB/s | 2.1 MB 00:00
Last metadata expiration check: 0:00:01 ago on Mon Aug 3 01:12:57 2026.
========================================================= Name Exactly Matched: gcc ==========================================================
gcc-12.3.0-20.an23.loongarch64 : Various compilers (C, C++, Objective-C, ...)
======================================================== Name & Summary Matched: gcc =========================================================
annobin-plugin-gcc-12.33-4.an23.loongarch64 : annobin gcc plugin
gcc-c++-12.3.0-20.an23.loongarch64 : C++ support for GCC
gcc-doc-12.3.0-20.an23.noarch : Documentation files for gcc
gcc-gdb-plugin-12.3.0-20.an23.loongarch64 : GCC plugin for GDB
gcc-plugin-annobin-12.3.0-20.an23.loongarch64 : The annobin plugin for gcc, built by the installed version of gcc
gcc-plugin-devel-12.3.0-20.an23.loongarch64 : Support for compiling GCC plugins
gcc-toolset-14-14.0-2.an23.loongarch64 : Package that installs gcc-toolset-14
gcc-toolset-14-annobin-plugin-gcc-12.52-3.an23.loongarch64 : annobin gcc plugin
gcc-toolset-14-gcc-14.2.1-3.an23.loongarch64 : GCC version 14
gcc-toolset-14-gcc-c++-14.2.1-3.an23.loongarch64 : C++ support for GCC version 14
gcc-toolset-14-gcc-gfortran-14.2.1-3.an23.loongarch64 : Fortran support for GCC 14
gcc-toolset-14-gcc-plugin-annobin-14.2.1-3.an23.loongarch64 : The annobin plugin for gcc, built by the installed version of gcc
gcc-toolset-14-gcc-plugin-devel-14.2.1-3.an23.loongarch64 : Support for compiling GCC plugins
gcc-toolset-14-libgccjit-14.2.1-3.an23.loongarch64 : Library for embedding GCC inside programs and libraries
gcc-toolset-14-libgccjit-devel-14.2.1-3.an23.loongarch64 : Support for embedding GCC inside programs and libraries
gcc-toolset-14-runtime-14.0-2.an23.loongarch64 : Package that handles gcc-toolset-14 Software Collection.
libgcc-12.3.0-16.an23.loongarch64 : GCC version 12 shared support library
libgcc-12.3.0-20.an23.loongarch64 : GCC version 12 shared support library
libgccjit-12.3.0-20.an23.loongarch64 : Library for embedding GCC inside programs and libraries
libgccjit-devel-12.3.0-20.an23.loongarch64 : Support for embedding GCC inside programs and libraries
============================================================= Name Matched: gcc ==============================================================
gcc-gfortran-12.3.0-20.an23.loongarch64 : Fortran support
gcc-toolset-14-annobin-annocheck-12.52-3.an23.loongarch64 : A tool for checking the security hardening status of binaries
gcc-toolset-14-annobin-docs-12.52-3.an23.noarch : Documentation and shell scripts for use with annobin
gcc-toolset-14-annobin-libannocheck-12.52-3.an23.loongarch64 : A library for checking the security hardening status of binaries
gcc-toolset-14-annobin-plugin-clang-12.52-3.an23.loongarch64 : annobin clang plugin
gcc-toolset-14-annobin-plugin-llvm-12.52-3.an23.loongarch64 : annobin llvm plugin
gcc-toolset-14-binutils-2.42-10.an23.loongarch64 : A GNU collection of binary utilities
gcc-toolset-14-binutils-2.42-8.an23.loongarch64 : A GNU collection of binary utilities
gcc-toolset-14-binutils-2.42-9.an23.loongarch64 : A GNU collection of binary utilities
gcc-toolset-14-binutils-2.42-7.an23.loongarch64 : A GNU collection of binary utilities
gcc-toolset-14-binutils-devel-2.42-10.an23.loongarch64 : BFD and opcodes static and dynamic libraries and header files
gcc-toolset-14-binutils-devel-2.42-8.an23.loongarch64 : BFD and opcodes static and dynamic libraries and header files
gcc-toolset-14-binutils-devel-2.42-9.an23.loongarch64 : BFD and opcodes static and dynamic libraries and header files
gcc-toolset-14-binutils-devel-2.42-7.an23.loongarch64 : BFD and opcodes static and dynamic libraries and header files
gcc-toolset-14-dwz-0.14-2.an23.loongarch64 : DWARF optimization and duplicate removal tool
gcc-toolset-14-libatomic-devel-14.2.1-3.an23.loongarch64 : The GNU Atomic static library
gcc-toolset-14-libitm-devel-14.2.1-3.an23.loongarch64 : The GNU Transactional Memory support
gcc-toolset-14-liblsan-devel-14.2.1-3.an23.loongarch64 : The Leak Sanitizer static library
gcc-toolset-14-libstdc++-devel-14.2.1-3.an23.loongarch64 : Header files and libraries for C++ development
gcc-toolset-14-libstdc++-docs-14.2.1-3.an23.loongarch64 : Documentation for the GNU standard C++ library
gcc-toolset-14-libtsan-devel-14.2.1-3.an23.loongarch64 : The Thread Sanitizer static library
gcc-toolset-14-libubsan-devel-14.2.1-3.an23.loongarch64 : The Undefined Behavior Sanitizer static library
gcc-toolset-15-binutils-2.44-3.an23.loongarch64 : A GNU collection of binary utilities
gcc-toolset-15-binutils-devel-2.44-3.an23.loongarch64 : BFD and opcodes static and dynamic libraries and header files
============================================================ Summary Matched: gcc ============================================================
libgomp-12.3.0-16.an23.loongarch64 : GCC OpenMP v4.5 shared support library
libgomp-12.3.0-20.an23.loongarch64 : GCC OpenMP v4.5 shared support library
[root@f2635efbd08f /]#
安装使用 gcc 14
dnf install -y gcc-toolset-14-gcc gcc-toolset-14-gcc-c++
# 激活 gcc 14
source /opt/rh/gcc-toolset-14/enable
# 或
# scl enable gcc-toolset-14 bash
gcc --version
[root@f2635efbd08f /]# gcc --version
gcc (GCC) 14.2.1 20240801 (Anolis OS 14.2.1-1)
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[root@f2635efbd08f /]#