1. Before installing yum, introduce the following knowledge.
1. Introduction to yum
Yum (full name Yellow dog Updater, Modified) is a Shell front-end package manager in Fedora, RedHat and CentOS . Based on RPM package management, it can automatically download and install RPM packages from a specified server, automatically handle dependencies, and install all dependent software packages at one time, without tedious downloading and installation again and again.
2. Introduction to Fedora
Fedora Linux (the seventh edition was formerly Fedora Core ) is developed by the Fedora Project community and sponsored by Red Hat , with the goal of creating a novel, versatile and free ( open source ) operating system. Fedora is the upstream source code for the commercial Red Hat Enterprise Linux distribution.
3. The build-essential software package
provides the list information of the necessary software packages for compiling the program. The build-essential package contains many necessary software packages for development. After installing a build-essential package, many packages corresponding to C/C++ dependencies will be installed.
You can view the dependencies of build-essential, enter the command: apt-cache depends build-essential
As can be seen from the above, after installing build-essential, the above dependencies will be installed.
The linux system used in this article is the ubuntu system.
Two, install yum
1. First install the build-essential package,
Instruction: apt-get install build-essential
After the installation is complete, the following prompt appears:
After the above installation process, an error may be reported. After entering the command according to the prompt, continue to enter the above command to complete the installation.
2. Install yum
steps :
sudo apt-get install yum
I have installed, enter again to indicate that it is installed, as follows
During the installation process, if there is an error: apt-get install E: Unable to locate the software package, please see the problem solving steps below. If it is normal, please skip the following steps.
///apt-get install E: Unable to locate software package problem solving start
Analysis: The problem of inability to locate occurs because the source image cannot be found. You only need to change the content of the source.list file under the /etc/apt/ path to the corresponding source image.
Proceed as follows:
cd /etc/apt/ // 切换到/etc/apt/ 目录下
sudo cp sources.list sources.list.old // 先把源文件复制到sources.list.old,备份
sudo vim sources.list //编辑文件
The contents of the sources.list file modified in this article are as follows:
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
After modification, enter wq! to save the modified file,
(Note: If vim is not installed, install the command sudo apt-get install vim)
After performing the above steps, enter the following command, the steps are as follows:
sudo apt-get update
sudo apt-get install yum
For the problem that the software package cannot be located above, please refer to Linux to solve the problem of apt-get install E: the software package cannot be located (detailed steps and notes are attached)_Lazy little bookworm's blog-CSDN blog_linux cannot locate the software package
For vim operation file skills, see: vim select all and copy all
///apt-get install E: Unable to locate the package problem solving end
Three, yum configuration
The function of yum configuration is: when using yum to download software, obtain the corresponding installation package from the corresponding configuration service resource. Yum configuration is divided into local configuration and network configuration. This article configures the yum resources of the network.
The steps are as follows :
cd /etc/yum/repos.d/
sudo wget http://mirrors.163.com/.help/fedora-163.repo
sudo wget http://mirrors.163.com/.help/fedora-updates-163.repo
Then replace all $releasever in the above two files with 17.
Then save the metadata cache, the steps are as follows:
sudo yum makecache
The following page appears:
At this point, the installation and configuration of yum is complete.
This article refers to the yum installation article:
The configuration yum reference link is as follows:
Yum installation and configuration
The yum management software articles are as follows: