Configuring the Compilation Environment
- Skip this section if the OS is openEuler 20.03.
- If the OS is CentOS 8.1, add a Yum source when installing Btrfs. For details, see Adding a Yum Source.
Adding a Yum Source
- Check for a Yum source.
1ls /etc/yum.repos.d/ - If an Internet Yum source (a .repo file) is found, back up the Yum source.
1 2 3
cd /etc/yum.repos.d mkdir bak mv *.repo bak
- Configure the Yum source.
1 2 3 4 5 6 7 8
cat >> CentOS-Base.repo <<EOF [everything] name=everything baseurl=https://repo.huaweicloud.com/openeuler/openEuler-20.03-LTS-SP1/everything/\$basearch/ enabled=1 gpgcheck=1 gpgkey=https://repo.huaweicloud.com/openeuler/openEuler-20.03-LTS-SP1/everything/\$basearch/RPM-GPG-KEY-openEuler EOF
- Make the Yum source take effect.
1 2
yum clean all yum makecache