Installing Basic Libraries
Installing basic libraries creates an offline development environment with all necessary tools and dependencies for compiling, executing, and deploying software.
- Mount the OS image.
mount YOUR_OS.iso /media -o loop
Replace YOUR_OS.iso with the actual ISO file name.
- Back up and clear the /etc/yum.repos.d/ directory.
1 2
cp -r /etc/yum.repos.d /etc/yum.repos.d-bak rm /etc/yum.repos.d/*
Upon executing the deletion command, the system will prompt you for confirmation. Confirm that all .repo files have been backed up. Then, enter y at the prompt and press Enter to proceed.
- Configure a local Yum repository.
- Open the /etc/yum.repos.d/Local.repo file.
1vi /etc/yum.repos.d/Local.repo - Press i to enter the insert mode and add the following content to the file:
1 2 3 4 5
[Local] name=Local baseurl=file:///media/ enabled=1 gpgcheck=0
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Make the Yum repository configuration take effect.
1 2
yum clean all yum makecache
- Open the /etc/yum.repos.d/Local.repo file.
- Install GCC and solve the -fsigned-char problem.
- Install GCC using the Yum repository.
1yum -y install gcc.aarch64 gcc-c++.aarch64 gcc-gfortran.aarch64 libgcc.aarch64
- Search for the directory where GCC is located. Generally, the directory is /usr/bin/gcc.
1command -v gcc
- Rename the original GCC file, for example, to gcc-impl.
mv /usr/bin/gcc /usr/bin/gcc-impl
- Configure the GCC file.
- Create a GCC file.
1vi /usr/bin/gcc - Press i to enter the insert mode and add the following content to the file:
1 2
#! /bin/sh /usr/bin/gcc-impl -fsigned-char "$@"
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Create a GCC file.
- Add the execute permission for the GCC file.
chmod +x /usr/bin/gcc
- Check whether GCC is available.
1gcc --version
- Install GCC using the Yum repository.
- Modify G++ to solve the -fsigned-char problem.
- Search for the directory where G++ is located. Generally, the directory is /usr/bin/g++.
1command -v g++
- Rename the original G++ file, for example, to g++-impl.
1mv /usr/bin/g++ /usr/bin/g++-impl
- Configure the G++ file.
- Create a G++ file.
1vi /usr/bin/g++ - Press i to enter the insert mode and add the following content to the file:
1 2
#! /bin/sh /usr/bin/g++-impl -fsigned-char "$@"
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Create a G++ file.
- Add the execute permission for the G++ file.
1chmod +x /usr/bin/g++
- Check whether G++ is available.
1g++ --version
- Search for the directory where G++ is located. Generally, the directory is /usr/bin/g++.
- Install the dependencies required for the development environment.
1yum install -y wget openssl-devel zlib-devel automake libtool make libstdc++-static glibc-static git snappy snappy-devel fuse fuse-devel
Parent topic: Configuring the Compilation Environment



